Hi, Not sure since I've never done it, but shouldn't it be NA instead of NULL?
Ivan Le 9/17/2010 15:23, n.via...@libero.it a écrit : > 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. > -- Ivan CALANDRA PhD Student University of Hamburg Biozentrum Grindel und Zoologisches Museum Abt. Säugetiere Martin-Luther-King-Platz 3 D-20146 Hamburg, GERMANY +49(0)40 42838 6231 ivan.calan...@uni-hamburg.de ********** http://www.for771.uni-bonn.de http://webapp5.rrz.uni-hamburg.de/mammals/eng/mitarbeiter.php [[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.