Hi everyone, I'd like to replace the empty cells from a numerical variable (let's say variable "AAA") with zero in multiple dataframes using "plyr" package. Of course all the dataframes have the same structure but different number of lines.
I've been trying variations of: |dataset <- list.files(pattern = "*.tab") replace_empty <- llply(dataset,function(x){x$AAA[is.na(x$AAA)] <-0; return(x)}) | But I always get the same error message: unexpected numeric constant in "llply(dataframes,function(x){x$AAA" Any suggestion? Thank you in advance! Regards, -- [[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.