11.07.2015 Views

Introductory Slides for R - Statistics

Introductory Slides for R - Statistics

Introductory Slides for R - Statistics

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Functions Creating Vectors> 1:10[1] 1 2 3 4 5 6 7 8 9 10> seq(-4,4,1) # sequence from -4 to 4 in increments of 1[1] -4 -3 -2 -1 0 1 2 3 4> seq(4,-4,-1) # sequence from 4 to -4 in increments of -1[1] 4 3 2 1 0 -1 -2 -3 -4> c(1,2,4,6,7) # concatenation of 1,2,4,6,7[1] 1 2 4 6 7> rep(1,10) # vector of 10 repeat 1’s[1] 1 1 1 1 1 1 1 1 1 1> rep(c(1,2),5) # vector of 5 repeat c(1, 2)[1] 1 2 1 2 1 2 1 2 1 2> rev(1:5) # reverse the vector 1:5[1] 5 4 3 2 112

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!