4 years ago1,000+ Views
If you don't already have your computer set up to program in R, then check out this card: http://www.vingle.net/posts/525420-Get-started-with-R CREATING A VECTOR To create a vector you can use the c function like this: x <- c(8,9,16,25, 33) Or you can even use a sequence function if you want to make a vector that has a sequence, such as 5, 10, 15, 20, 25 y <- seq(5,25, by=5) You can also use the repeat function if you want to make a vector of 7 2's (e.g. 2,2,2,2,2,2,2) z <- rep(2, 7) You can add, multiply vectors together x+y y*z As long as they are same length, unless you get an error. For more on basic operations, check out this link: http://www.cyclismo.org/tutorial/R/basicOps.html
@TechAtHeart I just took a course on regression analysis and had to learn this. It's not very hard, which is why I like R.
Yes, I do! Sorry I missed your comment. I use this for statistical analysis.
you are very welcome! do you use R?
this is so helpful!!!!!!
@csgeek very true! I feel very comfortable with R...at least way more comfortable thab when I took a Python class haha. Still fun!