Hi, I am new with rstudio and i have a trouble with this program. I store 17 
listsCPOD<-list()CPOD[[1]]<- GB1ACPOD[[2]]<- GB1CCPOD[[3]]<- GB1DCPOD[[4]]<- 
GB2ACPOD[[5]]<- GB2BCPOD[[6]]<- GB2CCPOD[[7]]<- GB2DCPOD[[8]]<- GB3ACPOD[[9]]<- 
GB3CCPOD[[10]]<- GB3DCPOD[[11]]<- GB4ACPOD[[12]]<- GB4CCPOD[[13]]<- 
GB4DCPOD[[14]]<- GB5ACPOD[[15]]<- GB5BCPOD[[16]]<- GB5CCPOD[[17]]<- GB5D
Each each file you can find a txt document that contains the columns: file, 
chuckend, Nfiltered, Nall, MinsOn and Presyabs. What I want to do is to create 
a loop for all the CPODs. If the row of the column Nfiltered is 0 then the row 
of the column Presyabs must be 0 if it is different than 0 then it must be 1.  
I create this loop without success#Creating the loop (0-1 presence, absence)
for(i in 1:length(CPOD[[1]]$Presyabs)){  if (CPOD[[1]]$Nfiltered[i]<1)    
(CPOD[[1]]$Presyabs[i]=1)}  else {    (CPOD[[1] ]$Presyabs[[i]]=0)}  }
Thank you for your prompt answer                                          
        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to