Dear list,
I have a question I'm trying to use the following command in R, but it gives 
me an error message.The command is:

data<-ddply(data,c("year","name"), transform, check1=ifelse(check1==1 & 
check2==1, 1,NULL))

so in my data frame I already have the check1 variable, if the conditions 
(check1==1 & check2==1) is respected, check has to have 1 as value, whereas if 
it is not I want that variable to maintain its value.
Anyone knows, how to do this, by doing this for name and year??

______________________________________________
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