[GRASS-stats] Rdbi Error in loadNamespace

14 messages Options
Embed this post
Permalink
Stanislav Bek

[GRASS-stats] Rdbi Error in loadNamespace

Reply Threaded More More options
Print post
Permalink
Hi,

I have a problem to connect my Postgre with R.
I did everything after Markus tutorial. It worked.
But next time I used it, I cannot go over this error:

"> library(Rdbi)
Loading required package: Rdbi
Error in loadNamespace(package, c(which.lib.loc, lib.loc), keep.source = keep.source) :
  cyclic name space dependencies are not supported
Error : package 'Rdbi' could not be loaded
Error : .onLoad failed in 'loadNamespace' for 'Rdbi'
Error: package/namespace load failed for 'Rdbi' "

I also tried to reinstall R, did not help.
Could you help, me?

Best regards,
Stanislav

_______________________________________________
grass-stats mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-stats
Daniel McInerney

Re: [GRASS-stats] Rdbi Error in loadNamespace

Reply Threaded More More options
Print post
Permalink
Hi Stanislav,
I'm not overly familiar with Rdbi and can't
suggest a fix for the error message that you
outline.

However, you might consider using the RODBC
library [1] as an alternative means of connecting
R to PostgreSQL. Provided you edit /etc/odbc.ini
and /etc/odbcinst.ini to suit your set-up, you can
connect to your db with relative ease using obdcConnect()
and query tables using  sqlQuery(). For additional
information see [2].

Regards,
Daniel.


[1] http://cran.r-project.org/web/packages/RODBC/index.html
[2] http://cran.r-project.org/doc/manuals/R-data.html#RODBC


[hidden email] wrote:

> Hi,
>
> I have a problem to connect my Postgre with R.
> I did everything after Markus tutorial. It worked.
> But next time I used it, I cannot go over this error:
>
> "> library(Rdbi)
> Loading required package: Rdbi
> Error in loadNamespace(package, c(which.lib.loc, lib.loc), keep.source = keep.source) :
>   cyclic name space dependencies are not supported
> Error : package 'Rdbi' could not be loaded
> Error : .onLoad failed in 'loadNamespace' for 'Rdbi'
> Error: package/namespace load failed for 'Rdbi' "
>
> I also tried to reinstall R, did not help.
> Could you help, me?
>
> Best regards,
> Stanislav
>
> _______________________________________________
> grass-stats mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/grass-stats
>  
_______________________________________________
grass-stats mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-stats
Markus Neteler

Re: [GRASS-stats] Rdbi Error in loadNamespace

Reply Threaded More More options
Print post
Permalink
On Mon, Jun 16, 2008 at 6:38 PM, Daniel McInerney
<[hidden email]> wrote:
> However, you might consider using the RODBC
> library [1] as an alternative means of connecting
> R to PostgreSQL.

If speed matters, better fix the RDBI installation:
http://grass.osgeo.org/statsgrass/r_and_dbms.html
(see second part)

In my test: 5sec (RDbi) against 4min 30sec (RODBC)!

Markus
_______________________________________________
grass-stats mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-stats
hamish-2

Re: [GRASS-stats] Rdbi Error in loadNamespace

Reply Threaded More More options
Print post
Permalink
In reply to this post by Stanislav Bek
Stanislav wrote:

> I have a problem to connect my Postgre with R.
> I did everything after Markus tutorial. It worked.
> But next time I used it, I cannot go over this error:
>
> "> library(Rdbi)
> Loading required package: Rdbi
> Error in loadNamespace(package, c(which.lib.loc, lib.loc),
> keep.source = keep.source) :
>   cyclic name space dependencies are not supported
> Error : package 'Rdbi' could not be loaded
> Error : .onLoad failed in 'loadNamespace' for
> 'Rdbi'
> Error: package/namespace load failed for 'Rdbi'
> "
>
> I also tried to reinstall R, did not help.

maybe a silly question, but is the Rdbi package already loaded at that point?


Hamish




     

_______________________________________________
grass-stats mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-stats
Jarosław Jasiewicz

Re: [GRASS-stats] Rdbi Error in loadNamespace

Reply Threaded More More options
Print post
Permalink
In reply to this post by Stanislav Bek
[hidden email] pisze:

> Hi,
>
> I have a problem to connect my Postgre with R.
> I did everything after Markus tutorial. It worked.
> But next time I used it, I cannot go over this error:
>
> "> library(Rdbi)
> Loading required package: Rdbi
> Error in loadNamespace(package, c(which.lib.loc, lib.loc), keep.source = keep.source) :
>   cyclic name space dependencies are not supported
> Error : package 'Rdbi' could not be loaded
> Error : .onLoad failed in 'loadNamespace' for 'Rdbi'
> Error: package/namespace load failed for 'Rdbi' "
>
> I also tried to reinstall R, did not help.
> Could you help, me?
>
> Best regards,
> Stanislav
>
> _______________________________________________
> grass-stats mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/grass-stats
>  
the simpliest way it ot delete .Rdata from your home directory and start
R again
Jarek
_______________________________________________
grass-stats mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-stats
Stanislav Bek

Re: [GRASS-stats] Rdbi Error in loadNamespace

Reply Threaded More More options
Print post
Permalink
In reply to this post by hamish-2
Stanislav wrote:

>> I have a problem to connect my Postgre with R.
>> I did everything after Markus tutorial. It worked.
>> But next time I used it, I cannot go over this error:
>>
>> "> library(Rdbi)
>> Loading required package: Rdbi
>> Error in loadNamespace(package, c(which.lib.loc, lib.loc),
>> keep.source = keep.source) :
>>   cyclic name space dependencies are not supported
>> Error : package 'Rdbi' could not be loaded
>> Error : .onLoad failed in 'loadNamespace' for
>> 'Rdbi'
>> Error: package/namespace load failed for 'Rdbi'
>> "
>>
>> I also tried to reinstall R, did not help.
>
>maybe a silly question, but is the Rdbi package already loaded at that
point?

Yes, it worked for the first time. Next time without success...
Stanislav

_______________________________________________
grass-stats mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-stats
Markus Neteler

Re: [GRASS-stats] Rdbi Error in loadNamespace

Reply Threaded More More options
Print post
Permalink
In reply to this post by hamish-2
On Tue, Jun 17, 2008 at 4:07 AM, Hamish <[hidden email]> wrote:

> Stanislav wrote:
>> I have a problem to connect my Postgre with R.
>> I did everything after Markus tutorial. It worked.
>> But next time I used it, I cannot go over this error:
>>
>> "> library(Rdbi)
>> Loading required package: Rdbi
>> Error in loadNamespace(package, c(which.lib.loc, lib.loc),
>> keep.source = keep.source) :
>>   cyclic name space dependencies are not supported
>> Error : package 'Rdbi' could not be loaded
>> Error : .onLoad failed in 'loadNamespace' for
>> 'Rdbi'
>> Error: package/namespace load failed for 'Rdbi'
>> "
>>
>> I also tried to reinstall R, did not help.
>
> maybe a silly question, but is the Rdbi package already loaded at that point?

Loading is done like this (maybe silly suggestion again):

library(Rdbi)
library(RdbiPgSQL)

(I discovered the hard way some months ago that the second
command is also needed, it wasn't some years ago).

Then, evil can creep in after version change through .RData in
the current working directory.

Markus
_______________________________________________
grass-stats mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-stats
Stanislav Bek

Re: [GRASS-stats] Rdbi Error in loadNamespace

Reply Threaded More More options
Print post
Permalink
In reply to this post by Jarosław Jasiewicz
>> Hi,
>>
>> I have a problem to connect my Postgre with R.
>> I did everything after Markus tutorial. It worked.
>> But next time I used it, I cannot go over this error:
>>
>> "> library(Rdbi)
>> Loading required package: Rdbi
>> Error in loadNamespace(package, c(which.lib.loc, lib.loc), keep.source
= keep.source) : >   cyclic name space dependencies are not supported

>> Error : package 'Rdbi' could not be loaded
>> Error : .onLoad failed in 'loadNamespace' for 'Rdbi'
>> Error: package/namespace load failed for 'Rdbi' "
>>
>> I also tried to reinstall R, did not help.
>> Could you help, me?
>>
>> Best regards,
>> Stanislav >
>> _______________________________________________
>> grass-stats mailing list
>> [hidden email]
>> http://lists.osgeo.org/mailman/listinfo/grass-stats
>>   the simpliest way it ot delete .Rdata from your home directory and
start R again
>Jarek
   
     When I delete "R"  folder from $HOME, all the installed packages
are deleted. This library I do have to create by installing, again and the
problem remains unsolved.
Stanislav

_______________________________________________
grass-stats mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-stats
Jarosław Jasiewicz

Re: [GRASS-stats] Rdbi Error in loadNamespace

Reply Threaded More More options
Print post
Permalink
[hidden email] pisze:

>>> Hi,
>>>
>>> I have a problem to connect my Postgre with R.
>>> I did everything after Markus tutorial. It worked.
>>> But next time I used it, I cannot go over this error:
>>>
>>> "> library(Rdbi)
>>> Loading required package: Rdbi
>>> Error in loadNamespace(package, c(which.lib.loc, lib.loc), keep.source
>>>      
> = keep.source) : >   cyclic name space dependencies are not supported
>  
>>> Error : package 'Rdbi' could not be loaded
>>> Error : .onLoad failed in 'loadNamespace' for 'Rdbi'
>>> Error: package/namespace load failed for 'Rdbi' "
>>>
>>> I also tried to reinstall R, did not help.
>>> Could you help, me?
>>>
>>> Best regards,
>>> Stanislav >
>>> _______________________________________________
>>> grass-stats mailing list
>>> [hidden email]
>>> http://lists.osgeo.org/mailman/listinfo/grass-stats
>>>   the simpliest way it ot delete .Rdata from your home directory and
>>>      
> start R again
>  
>> Jarek
>>    
>    
>      When I delete "R"  folder from $HOME, all the installed packages
> are deleted. This library I do have to create by installing, again and the
> problem remains unsolved.
> Stanislav
>  
You are not to deleate R folder with packages but hidden file .RData
(with "." o the begining):
rm .Rdata
try it, and let us known if help
Jarek
_______________________________________________
grass-stats mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-stats
Stanislav Bek

Re: [GRASS-stats] Rdbi Error in loadNamespace

Reply Threaded More More options
Print post
Permalink

______________________________________________________________

> Od: [hidden email]
> Komu: [hidden email]
> CC: [hidden email]
> Datum: 17.06.2008 11:04
> Předmět: Re: [GRASS-stats] Rdbi Error in loadNamespace
>
>[hidden email] pisze:
>>>> Hi,
>>>>
>>>> I have a problem to connect my Postgre with R.
>>>> I did everything after Markus tutorial. It worked.
>>>> But next time I used it, I cannot go over this error:
>>>>
>>>> "> library(Rdbi)
>>>> Loading required package: Rdbi
>>>> Error in loadNamespace(package, c(which.lib.loc, lib.loc),
keep.source
>>>>       > = keep.source) : >   cyclic name space dependencies are not
supported

>>   >>> Error : package 'Rdbi' could not be loaded
>>>> Error : .onLoad failed in 'loadNamespace' for 'Rdbi'
>>>> Error: package/namespace load failed for 'Rdbi' "
>>>>
>>>> I also tried to reinstall R, did not help.
>>>> Could you help, me?
>>>>
>>>> Best regards,
>>>> Stanislav >
>>>> _______________________________________________
>>>> grass-stats mailing list
>>>> [hidden email]
>>>> http://lists.osgeo.org/mailman/listinfo/grass-stats
>>>>   the simpliest way it ot delete .Rdata from your home directory and
>>>>       > start R again
>>   >> Jarek
>>>     >    >      When I delete "R"  folder from $HOME, all the
installed packages
>> are deleted. This library I do have to create by installing, again and
the
>> problem remains unsolved.
>> Stanislav >   You are not to deleate R folder with packages but hidden
file .RData (with "." o the begining):
>rm .Rdata
>try it, and let us known if help
>Jarek

~$ rm ~/.Rdata
rm: cannot remove `.Rdata': No such file or directory
(Thank you for your patience with a beginner.)

(I used both...
library(Rdbi)
library(RdbiPgSQL)
)

Stanislav

       

_______________________________________________
grass-stats mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-stats
giohappy

Re: [GRASS-stats] Rdbi Error in loadNamespace

Reply Threaded More More options
Print post
Permalink
> ~$ rm ~/.Rdata
> rm: cannot remove `.Rdata': No such file or directory

This is strange... you don't have the .RData in your home folder...
Try:
find / -name .Rdata
_______________________________________________
grass-stats mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-stats
Markus Neteler

Re: [GRASS-stats] Rdbi Error in loadNamespace

Reply Threaded More More options
Print post
Permalink
In reply to this post by Stanislav Bek
2008/6/17  <[hidden email]>:
>>[hidden email] pisze:

> ~$ rm ~/.Rdata
> rm: cannot remove `.Rdata': No such file or directory
> (Thank you for your patience with a beginner.)

you must search in the *current* directory where you
launch R. There may be many .Rdata files.

I just installed Rdbi and it worked for me...

Trick: create a new directory, go inside and launch
R inside. Then it will work :)

Markus
_______________________________________________
grass-stats mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-stats
Stanislav Bek

Re: [GRASS-stats] Rdbi Error in loadNamespace

Reply Threaded More More options
Print post
Permalink
In reply to this post by giohappy
>> ~$ rm ~/.Rdata
>> rm: cannot remove `.Rdata': No such file or directory
>
>This is strange... you don't have the .RData in your home folder...
>Try:
>find / -name .Rdata

find / -name .Rdata
find: /etc/ssl/private: Permission denied
find: /etc/cups/ssl: Permission denied
find: /sys/fs/fuse/connections/2: Permission denied
find: /sys/fs/fuse/connections/1: Permission denied
find: /var/lib/gdm: Permission denied
find: /var/lib/PolicyKit: Permission denied
find: /var/lib/postgresql/8.2/main: Permission denied
find: /var/lib/postgresql/8.3/main: Permission denied
find: /var/lib/postgresql/.config: Permission denied
find: /var/lib/postgresql/.gnome2: Permission denied
find: /var/run/cups/certs: Permission denied
find: /var/cache/ldconfig: Permission denied
find: /var/cache/system-tools-backends/backup: Permission denied
find: /var/spool/cron/atjobs: Permission denied
find: /var/spool/cron/atspool: Permission denied
find: /var/spool/cron/crontabs: Permission denied
find: /var/spool/cups: Permission denied
find: /proc/tty/driver: Permission denied
find: /proc/1/task/1/fd: Permission denied
........
find: /proc/5875/fdinfo: Permission denied
find: /root/.gnome2_private: Permission denied
find: /root/.gconfd: Permission denied
find: /root/.gnome2: Permission denied
find: /root/.gconf: Permission denied
find: /root/.synaptic: Permission denied

Stanislav

_______________________________________________
grass-stats mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-stats
Stanislav Bek

Re: [GRASS-stats] Rdbi Error in loadNamespace

Reply Threaded More More options
Print post
Permalink
In reply to this post by Markus Neteler
>2008/6/17  <[hidden email]>:
>>>[hidden email] pisze:
>
>> ~$ rm ~/.Rdata
>> rm: cannot remove `.Rdata': No such file or directory
>> (Thank you for your patience with a beginner.)
>
>you must search in the *current* directory where you
>launch R. There may be many .Rdata files.
>
>I just installed Rdbi and it worked for me...
>
>Trick: create a new directory, go inside and launch
>R inside. Then it will work :)
>
>Markus

Sensation!! Works. :)
Thank you!
Stanislav

>

_______________________________________________
grass-stats mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-stats