Jeff Newmiller <jdnewmil <at> dcn.davis.ca.us> writes: > In general, creating variables while attached leads to problems such > as you describe. Normally the recommendation is to avoid the use of > attach and detach entirely in favor of explicit reference to the > data frame using [[]], [,], $, and the data= argument supported by > many functions.
And with() and within() [as well as transform(), mutate(), subset(), etc.: see http://r4stats.com/2013/01/22/comparing-tranformation-styles/ [sic "tranformation"] ______________________________________________ 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.