Re: [R] Re storing a UPDATES on a data.frame

From: savanna3000 <savanna3000_at_hotmail.com>
Date: Sun, 17 Feb 2008 07:46:49 -0800 (PST)

Thank you Prof Brian, this really solved my problem and it was well explained :)

Prof Brian Ripley wrote:
>
> Well
>
> - MASS is a package and not a library
> - it is not 'base' but 'contributed', and as library(help=MASS) says,
> support software for a book. It is on CRAN.
> - Packages with namespaces are read-only, so you have not changed the
> data frame in MASS, and even for other packages you can only change the
> copy in memory, not that on disc (all 'unless you know to subvert the
> standard ways').
>
> What you likely did was to create a new data frame 'whiteside' in your
> user workspace and then save the workspace containing it. In which case
>
> rm(whiteside)
> save.image()
>
> will fix it. However, you should have got warnings about conflicts when
> you started R, but perhaps you forgot to mention those.
>
> Perhaps the following might be educative:
>

>> library(MASS)
>> find("whiteside")

> [1] "package:MASS"
>> whiteside$temp <- 1
>> find("whiteside")

> [1] ".GlobalEnv" "package:MASS"
>
> This is really an internal version of
>
> whiteside <- `$<-`(whiteside, temp, 1)
>
> and that assigns in the current frame just like any other assignment.
>
>
> On Fri, 15 Feb 2008, savanna3000 wrote:
>
>>
>> Hello everyone,
>>
>>  Can anyone tell me how do I restore data in a data.frame provided by
>> base
>> R libraries (MASS) ?
>> I uninstalled R then installed it again and I still see the new changes I
>> made!!!???
>> (eg. whiteside$Temp=1 ==> 1 overwrote all the rows, I want the old values
>> :(
>> !!
>>
>>
>>  Please HELP!
>> --
>> View this message in context:
>> http://www.nabble.com/Restoring-a-UPDATES-on-a-data.frame-tp15512767p15512767.html
>> Sent from the R help mailing list archive at Nabble.com.
>>
>> ______________________________________________
>> R-help_at_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.
>>

>
> --
> Brian D. Ripley, ripley@stats.ox.ac.uk
> Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
> University of Oxford, Tel: +44 1865 272861 (self)
> 1 South Parks Road, +44 1865 272866 (PA)
> Oxford OX1 3TG, UK Fax: +44 1865 272595
>
> ______________________________________________
> R-help_at_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.
>
>
-- 
View this message in context: http://www.nabble.com/Restoring-a-UPDATES-on-a-data.frame-tp15512767p15530584.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help_at_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.
Received on Sun 17 Feb 2008 - 15:58:21 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 Sun 17 Feb 2008 - 16:30:15 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.

list of date sections of archive