A cleaner approach than attach()---because you don't need to remember
to detach()---is:
my.df<-data.frame(cbind(x=runif(100), y=rnorm(100)))
head(my.df)
with(my.df, plot(y~x))
_
Professor Michael Kubovy
University of Virginia
Department of Psychology
USPS: P.O.Bo
Hi Edna,
I am not sure the completely right answer, but I suspect that you use
data(df) to invoke a data.frame from the sample datasets provided from the
packages available on your R system. By other side, if you have a data.frame
loaded on your environent, you can use "attach" do turn the columns
Hi!
What is the difference between using data(somedataset) vs.
attach(somedataset), please?
thanks,
Edna Bell
__
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/po
3 matches
Mail list logo