[R] readRDS problem

Erich Neuwirth erich.neuwirth at univie.ac.at
Wed Feb 24 12:11:16 CET 2016


?data
will show you that data is a reserved word!


> On 24 Feb 2016, at 11:02, Sigbert Klinke <sigbert at wiwi.hu-berlin.de> wrote:
> 
> Hi,
> 
> thanks, using
> 
> test <<- readRDS (name)
> 
> it worked. But why?
> 
> Best Sigbert
> 
> Am 24.02.2016 um 10:39 schrieb Michael Dewey:
>> Try calling it something other than data.
>> 
>> On 24/02/2016 09:26, Sigbert Klinke wrote:
>>> Hi,
>>> 
>>> I have two scripts, one creates a data structure (a list of data frames
>>> + some attributes) and saves it via saveRDS.
>>> 
>>> The second script reads the RDS file (outside of any function) and
>>> 
>>> data <- readRDS (name)
>>> 
>>> works, but
>>> 
>>> data <<- readRDS (name)
>>> 
>>> creates the error
>>> 
>>> Error: cannot change value of locked binding for 'data'
>>> 
>>> Any idea what goes wrong?
>>> 
>>> Thanks Sigbert
>>> 
>> 
> 
> 
> --
> http://u.hu-berlin.de/sk <http://u.hu-berlin.de/sk>
> ______________________________________________
> R-help at r-project.org <mailto:R-help at r-project.org> mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help <https://stat.ethz.ch/mailman/listinfo/r-help>
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html <http://www.r-project.org/posting-guide.html>
> and provide commented, minimal, self-contained, reproducible code.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 670 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20160224/de74f9b5/attachment.bin>


More information about the R-help mailing list