[R] approxfun + save: problem as R_approx changed package

Ugoccioni Roberto roberto.ugoccioni at intesasanpaolo.com
Wed Mar 26 19:35:25 CET 2008


Hi all,
I recently switched to R version 2.6.2 (from 2.5.0 I was using) on Windows XP.
I have a fair amount of previous data saved in the form of "approxfun" objects created by version 2.5.0, with code basically like this:

> x <- rlnorm(100,10,2)
> f <- approxfun(1:100,x)
> f(5)
[1] 313811.3
> save(f, file="mytest_approx.Rdata")

Now on 2.6.2, when I try to reuse the saved object I get an error:

> attach("mytest_approx.Rdata")
> f(5)
Error in .C("R_approx", as.double(x), as.double(y), as.integer(n), xout = as.double(v),  :
  C symbol name "R_approx" not in DLL for package "base"


If I create the approxfun in 2.6.2 and use it in 2.5.0, I get a "mirrored" error:
Error in .C("R_approx", as.double(x), as.double(y), as.integer(n), xout = as.double(v),  :
        C symbol name "R_approx" not in DLL for package "stats"

It seems to me the two versions of R are looking for the same thing in different places, is it because of the environment they carry?
Can anyone suggest a way to work around this situation?

Thanks,
  Roberto

----
 Roberto Ugoccioni
 Intesa Sanpaolo SpA
 Servizio Operational Risk Management
 Ufficio Sviluppo e Gestione del Sistema ORM
 Via Monte di Pietà 26
 10122 Torino
 Italy
-----


Prima di stampare, pensa all'ambiente ** Think about the environment before printing
-------------- next part --------------
Il  contenuto  e  gli allegati  di questo  messaggio  sono  strettamente
confidenziali,  e ne sono vietati la diffusione e l'uso non autorizzato.

Le  opinioni  ivi  eventualmente  espresse sono  quelle  dell'autore: di
conseguenza  il  messaggio  non  costituisce  impegno  contrattuale  tra
il Gruppo Intesa Sanpaolo  ed  il  destinatario, e  la  banca  non  assume 
alcuna responsabilita' riguardo ai contenuti del testo e dei relativi
allegati, ne' per eventuali intercettazioni, modifiche o danneggiamenti.

Qualora il presente messaggio Le fosse pervenuto per errore,  Le saremmo
grati  se lo  distruggesse e,  via e-mail,  ne comunicasse  l' errata
ricezione all'indirizzo postmaster at intesasanpaolo.com.
 

This e-mail (and any attachment(s)) is strictly confidential and for use
only by intended recipient(s).  Any opinions therein expressed are those
of the author.  Therefore  its content  doesn't represent any commitment
between Intesa Sanpaolo Group  and  the  recipient(s)and   no  liability
or responsibility  is  accepted  by  Sanpaolo Group  for  the above
mentioned content.

Intesa Sanpaolo S.p.A. is a Bank authorised by Banca d'Italia; Intesa Sanpaolo
S.p.A. - London Branch - is regulated by the Financial Services  Authority
for the conduct of investment business in the UK.

If    you   are   not   an   intended   recipient(s),    please   notify
postmaster at intesasanpaolo.com promptly and destroy this message.


More information about the R-help mailing list