Breaking News
Loading...

Sequence Command



R is more than a programming language. It is an interactive environment for doing statistics. I find it more helpful to think of R as having a programming language than being a programming language. The R language is the scripting language for the R environment, just as VBA is the scripting language for Microsoft Excel. Some of the more unusual features of the R language begin to make sense when viewed from this perspective.

Sequence (from ,to,by,length.out)
================================
> seq(1,6)
[1] 1 2 3 4 5 6
> seq(1,6,1.5)
[1] 1.0 2.5 4.0 5.5
> seq(1,6,by=1.5)
[1] 1.0 2.5 4.0 5.5
> seq(1,6,2.3)
[1] 1.0 3.3 5.6
> seq(1,6,2.3,10)
by adds the value starting from first value
length.out divides the range into equal parts
- See more at: http://labstrikes.blogspot.in/2012/08/adsense-middle-blog-post.html#sthash.gQgSkqx8.dpuf
 
Toggle Footer