[R] add more data to a data file, problem with .Rprofile
andy_liaw at merck.com
Thu Jul 22 01:59:51 CEST 2004
> From: Francisco J Molina
> Is there a way to incorporate an R object x to a file already
> containing R objects?
> It seems that 'save' is not capable to do this. If I save x
> to a file containing
> previously saved data, then I will lose this data.
See if the following helps:
> x <- 2
> save(x, file="x.rda")
> assign("y", 3, pos=2)
 "x" "y"
> save(list=ls(2), file="x.rda")
Error: Object "x" not found
Error: Object "y" not found
 "x" "y"
> I use the funcion hsv in .Rprofile but it is recognized.
> Couriously, if I source .Rprofile
> when R is already running I do not get any error message.
Not sure what you mean...
> Thank you.
> R-help at stat.math.ethz.ch mailing list
> PLEASE do read the posting guide!
More information about the R-help