Dear all,
I'm stuck in a seemingly trivial task that I need to perform for many
datasets. Basically, I want to replace NA with 0 in a specified range of
columns in a dataframe. I know the first and last column to be recoded
only by its name.
I can select the columns starting like this
a[match('first',names(a)): match('last',names(a))]
The question is how can replace all NA with 0 in this subset of the data?
Thanks and greetings,
Michael
______________________________________________
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.