[R] problem with tseries (was unable to restore saved data)

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Aug 9 08:58:45 CEST 2006


Hmm.  'time' is in package stats, and you seem to have saved an object 
that is pulling in the namespace 'tseries'.

Loading the workspace is done before loading the standard set of packages.
This appears to be a bug in tseries, for if its namespace needs 'time', it 
should import it from 'stats', and it is not even depending on 'stats'.

I can confirm that:

gannet% env R_DEFAULT_PACKAGES=NULL R
...
> loadNamespace("tseries")
Error: object 'time' not found whilst loading namespace 'tseries'

That is a matter for the 'tseries' maintainer (Cc:ed here).  If you
try library(tseries) at that point you find

> library(tseries)
Loading required package: zoo
Error: object 'aggregate' not found whilst loading namespace 'zoo'
Error: package 'zoo' could not be loaded

so package zoo has a similar problem (maintainer Cc:ed).


What can you do?  The simplest is to rename the workspace and load() 
afterwards as you have done.  But before saving, remove any objects which 
have a dependence on tseries.


On Tue, 8 Aug 2006, Alessandro Gagliardi wrote:

> Lately, when I try to open R I get the following error message:
> 
> Error: object 'time' not found whilst loading namespace 'tseries'
> Fatal error: unable to restore saved data in .RData
> 
> If I rename .RData to RData.RData and then try opening R again it
> works.  Then I can load("RData.RData") without a problem.  But if I
> try saving my workspace (as the default, ".RData") and reload R it
> crashes all over again.

R does NOT crash.  It is objecting (correctly) to your saved workspace.
Please see the posting guide, which specifically asked you not to abuse 
that word.

> I don't know how to get this 'time' object back.  (I must have removed 
> it by accident at some point.)  Any ideas?


-- 
Brian D. Ripley,                  ripley at 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



More information about the R-help mailing list