Re: [R] saving datafreame object problem

From: Duncan Murdoch <murdoch_at_stats.uwo.ca>
Date: Tue, 22 May 2007 21:20:50 -0400

On 22/05/2007 8:25 PM, toby909_at_gmail.com wrote:
> Do I miss here something?
>
>
> dtaa =
> read.table("http://www.ats.ucla.edu/stat/mplus/examples/ma_snijders/mlbook1.dat",
> sep=",")
>
> head(dtaa) # shows the data as it should be
>
> save(dtaa,"dtaa",file="c:/dtaa")

Besides what Thomas said:

Just give the object once. You don't need its name separately from its value:

save(dtaa, file="c:/dtaa")

The way you did it you will save the object twice.
>
> d = load("c:/dtaa")
>
> head(d) # all data is lost, it only shows [1] "dtaa" "dtaa"

That's why the name was listed twice here.

Duncan Murdoch

>
>
> Thanks for your hint on this.
>
> Toby
>
> ______________________________________________
> R-help_at_stat.math.ethz.ch 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.



R-help_at_stat.math.ethz.ch 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. Received on Wed 23 May 2007 - 01:28:56 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 23 May 2007 - 01:31:04 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.