I have a data frame with both positive and negative values, and I want to make all the negative values equal zero, so i can eventually take an average.
I've tried
temp2 <- ifelse(tempr<0, 0, tempr)
but it doesn't seem to work.

Any suggestions?

Thanks!

______________________________________________
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