Re: [R] R loops

2008-10-09 Thread Wacek Kusnierczyk
[EMAIL PROTECTED] wrote: > hello everybody, > > I have a directory with over 3000 files with different names. I would like > to make some vectors with the file names which are belong together. > > I'm trying to do it with a for loop in R: > > SF <- c("ad", "cd", "cer", "stress", "salty", "PC", "hi

[R] R loops

2008-10-09 Thread assa . yeroslaviz
hello everybody, I have a directory with over 3000 files with different names. I would like to make some vectors with the file names which are belong together. I'm trying to do it with a for loop in R: SF <- c("ad", "cd", "cer", "stress", "salty", "PC", "high", "transfer", "cold", "heat") # th

Re: [R] R loops

2008-01-28 Thread Duncan Murdoch
On 1/28/2008 8:48 AM, cvandy wrote: > I'm a new user and am having trouble with loops. > In the following, I'm trying to add the results of "test" and the loops are > not working. > I've simplified the loop. What am I doing wrong? > Thanks! >> test<-numeric(20) >> tot<-numeric(20) >> for(i in 1:20

[R] R loops

2008-01-28 Thread cvandy
I'm a new user and am having trouble with loops. In the following, I'm trying to add the results of "test" and the loops are not working. I've simplified the loop. What am I doing wrong? Thanks! > test<-numeric(20) > tot<-numeric(20) > for(i in 1:20){test[i]<-1} > for (i in 1:20){tot[i]<-(test[i]