[R] for ( i in 23:0 ) { V <- vector [ 1 : i ] }

Bert Gunter gunter.berton at gene.com
Wed Oct 24 16:06:13 CEST 2012


Quoting Rolf Turner:

(1) Learn something about R; don't just hammer and hope.  Read the
introductory manuals and scan the FAQ.

-- Bert

On Wed, Oct 24, 2012 at 5:25 AM, colaiutachambers
<gabriele.carrarini at gmail.com> wrote:
> I'm used to run that on Matlab
>>> for indice=1:23,
> V=vector(1:indice)
> end
> that give me 23 vectors as output.
>
> Why the same command on R  " for ( i in 23:0 )  { V <- vector [ 1 : i ] } "
> returns one only vector?
> How can I obtain the 23 vectors that I need ?
>
> Thank you.
>
>
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/for-i-in-23-0-V-vector-1-i-tp4647306.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



-- 

Bert Gunter
Genentech Nonclinical Biostatistics

Internal Contact Info:
Phone: 467-7374
Website:
http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm




More information about the R-help mailing list