Questions and Answers
Problems and Solutions
Quotes help make search much faster. Example: "Practice Makes Perfect"
Tuesday, October 22, 2013
In R, how could you make a vector filled with values from 1 to 50?
Answer:
Method 1
c(1:50)
//note, this uses the c (combine) function and start:end notation
Method 2
seq(1,50)
//note, this uses the seq function, and instead of a colon (:), a comma is placed between the start and end numbers
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
This is an example of
scrolling text
using Javascript.
Popular Posts
Codecademy Sample Solution: Codeyear Eliminating Unnecessary HTML
<style> p { margin: 0px; padding-left: 10%; padding-right: 10%; text-align: justify; border-style: dashed;...
Codeyear: Deal It Out
//sample solution // Card Constructor function Card(num1,num2) { //properties var suit = num1; var number = num2; //methods ...
Codecademy: Codeyear Conditionals
//sample solution var gender = "female"; if (gender === "female") { result = true; } else { result = false; ...
Codeschool Cliffs of Value Modulus Sample Solution
Find an expression using two values and the modulus operator that results as 4 Answer: 32%7
Codecademy > Learn Java > ArrayList: Manipulation Sample Solution
import java.util.ArrayList; public class Temperatures { public static void main(String[] args) { ArrayList<Integer> weeklyTem...
How long do undisturbed fingerprints last in a crime scene?
Years
#Codeschool Backbone.js Sample Solution to Define Render
var AppointmentView = Backbone.View.extend({ render: function() { var html = '<li>' + this.model.get('title')...
Codecademy: "And"
#sample solution # boolean_1 = 77 < 78 && 77 < 77 boolean_1 = false # boolean_2 = true && 100 >= 100 boolea...
Codefights candles(candlesNumber, makeNew)
//sample solution function candles(candlesNumber, makeNew) { var newCandles=candlesNumber; var newlyBurnedCandles=0; var lef...
Codecademy: Sending a Letter
#sample solution Lloyd = { "name":"Lloyd", "homework": [90,97,75,92], "quizzes": ...
No comments:
Post a Comment