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. I don't know how to get this 'time' object back. (I must have removed it by accident at some point.) Any ideas? Thanks in advance, -- Alessandro Gagliardi Integrative Neuroscience Program Rutgers University Mind Brain Analysis alessandro at gagliardi.name "The opposite of a correct statement is a false statement. But the opposite of a profound truth may well be another profound truth." -Niels Bohr
Prof Brian Ripley
2006-Aug-09 06:58 UTC
[R] problem with tseries (was unable to restore saved data)
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