Skip to content

Eclipse and StatET Howto (also added Subversion, Rtools)

10 messages · Berwin A Turlach, Ken-JP, Peter Dalgaard +1 more

#
An update: after several days of struggling, I got StatET to work on Ubuntu
8.10 amd64, R 2.8.1.

Here are some tips:
1. You may run into an X11 issue with tktcl in R as someone decided to omit
/etc/X11/rgb.txt  If you get weird issues with your R installation with
window colors like "red" or "black", then you may be missing this file. 
Retrieve a copy off the web, and log in/out or restart your X.

2. When installing packages into R >DO NOT< use sudo or you will run into
problems later on - particularly if  your R packages automatically install
into /home/myname/R/x86_64-pc-linux-gnu-library/2.8

3. I read of many problems with OpenJDK so uninstall that and install Sun's
JDK instead (I think rJava may need Sun's JDK).  Google around for
instructions - it was safer to remove OpenJDK first.  Make sure you get
something reasonable when you do "java -version" and "R CMD javareconf"

4. Make sure you install the package rJava to completion - the system will
build it

***5. Under Run configurations>JRE>VM Arguments
you need something like this:
-Drjava.path=/home/myname/R/x86_64-pc-linux-gnu-library/2.8/rJava

I lost many hours with 5., but of course I didn't RTFM!!!  Didn't need this
one for Windoze, but needed it for Ubuntu.

http://www.walware.de/goto/statet

near the bottom...

Note:  There were probably other small steps during the install, but I
didn't keep track.
However, all solutions were found through googling...

Of course, the advantage is, under amd64, we are no longer limited to 3GB of
memory for R.

Good luck!
#
On 4 April 2009 at 13:59, Ken-JP wrote:
| An update: after several days of struggling, I got StatET to work on Ubuntu
| 8.10 amd64, R 2.8.1.
| 
| Here are some tips:
| 1. You may run into an X11 issue with tktcl in R as someone decided to omit
| /etc/X11/rgb.txt  If you get weird issues with your R installation with
| window colors like "red" or "black", then you may be missing this file. 
| Retrieve a copy off the web, and log in/out or restart your X.

Well "dpkg -S /etc/X11/rgb.txt" says that this belongs to x11-common. Do you
have that package installed?

| 2. When installing packages into R >DO NOT< use sudo or you will run into
| problems later on - particularly if  your R packages automatically install
| into /home/myname/R/x86_64-pc-linux-gnu-library/2.8

R packages Debian / Ubuntu systems have for years defaulted to using
/usr/local/lib/R/site-library -- that is still good default choice [and this
works via the R_LIBS entry in /etc/R/Renvirin and won't work if you locally
compile from R sources].  Sudo works, or you can youself to group adm or
staff and then use chmod g+w /usr/local/lib/R and you don't even need sudo.

| 3. I read of many problems with OpenJDK so uninstall that and install Sun's
| JDK instead (I think rJava may need Sun's JDK).  Google around for
| instructions - it was safer to remove OpenJDK first.  Make sure you get
| something reasonable when you do "java -version" and "R CMD javareconf"
| 
| 4. Make sure you install the package rJava to completion - the system will
| build it

The package r-cran-rjava is now in Debian and should be in Jaunty. Then you
shouldn't need to have to fiddle with this.

Thanks, Dirk

| ***5. Under Run configurations>JRE>VM Arguments
| you need something like this:
| -Drjava.path=/home/myname/R/x86_64-pc-linux-gnu-library/2.8/rJava
| 
| I lost many hours with 5., but of course I didn't RTFM!!!  Didn't need this
| one for Windoze, but needed it for Ubuntu.
| 
| http://www.walware.de/goto/statet
| 
| near the bottom...
| 
| Note:  There were probably other small steps during the install, but I
| didn't keep track.
| However, all solutions were found through googling...
#
Yes, I have x11-common installed, and dpkg -S /etc/X11/rgb.txt shows "not
found" for me.  
This is on Ubuntu 8.10 amd64.

http://ubuntuforums.org/archive/index.php/t-59024.html

Thanks for the detailed explanation on how R decides on where to install
packages!
I think I ran into problems when I haphazardly intermixed "sudo R" with "R"
before installing packages.

-------------------------------------

BTW, is there a way to install all packages via:
for Ubuntu without building everything?  

I noticed quite a few errors when I tried this - build problems probably
mostly due to missing installations in the OS.  

It was much nicer when I tried this on Windoze, and everything was pulled in
cleanly and quickly.

Is there a reason that packages seem to be in r-cran-XXX via "apt-get
install" for Ubuntu?  
There must be an obvious reason that I don't know about...

Thanks for taking the time to answer.

- Ken
#
Hi again,
On 4 April 2009 at 14:37, Ken-JP wrote:
| Yes, I have x11-common installed, and dpkg -S /etc/X11/rgb.txt shows "not
| found" for me.  
| This is on Ubuntu 8.10 amd64.

Same 8.10 for both amd64 and i386 where I checked -- both have the file. It
could be a leftover from an earlier install of mine, or an accidental
deletion at your end.

| Thanks for the detailed explanation on how R decides on where to install
| packages!
| I think I ran into problems when I haphazardly intermixed "sudo R" with "R"
| before installing packages.
| 
| -------------------------------------
| 
| BTW, is there a way to install all packages via:
| 
| > install.packages(available.packages()[,1]) 
| 
| for Ubuntu without building everything?  
| 
| I noticed quite a few errors when I tried this - build problems probably
| mostly due to missing installations in the OS.  

Well "you as the admin / user" have to make sure you provided the needed -dev
packages that may be needed for compilation from package sources.  R cannot
know what those are called on Ubuntu, OS X, ...

| It was much nicer when I tried this on Windoze, and everything was pulled in
| cleanly and quickly.

Those are _binaries_ not sources, and yes, the longer-term plan is to provide
binaries for Debian and maybe Ubuntu as well.  Not available yet though.

| Is there a reason that packages seem to be in r-cran-XXX via "apt-get
| install" for Ubuntu?  
| There must be an obvious reason that I don't know about...

Some are (manually) packaged by maintainers like myself, but that covers only
about 60 or so out of the 1600+ that are available. 

| Thanks for taking the time to answer.

My pleasure. You raised good points. In case you didn't know that, the
r-sig-debian list (subscription required for posting) is there to help with
Debian / Ubuntu question.  

Dirk


| 
| - Ken
| 
| 
| 
| -- 
| View this message in context: http://www.nabble.com/Eclipse-and-StatET-Howto-%28also-added-Subversion%2C-Rtools%29-tp22764049p22888024.html
| Sent from the R help mailing list archive at Nabble.com.
| 
| ______________________________________________
| R-help at r-project.org mailing list
| https://stat.ethz.ch/mailman/listinfo/r-help
| PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
| and provide commented, minimal, self-contained, reproducible code.
#
G'day Dirk,

On Sat, 4 Apr 2009 20:27:22 -0500
Dirk Eddelbuettel <edd at debian.org> wrote:

            
My guess that it is the former. :)  Some time ago I wiped Debian of my
laptop and installed Kubuntu 8.10 fresh (i386 flavour); so no left
overs from previous versions and on my laptop the results are:

berwin at berwin5:~$ apt-file find /etc/X11/rgb.txt
berwin at berwin5:~$ dpkg -S /etc/X11/rgb.txt
dpkg: /etc/X11/rgb.txt not found.

Cheers,

	Berwin
#
Berwin A Turlach wrote:
Hum.. Fedora 9 doesn't have it either.

It does have /usr/share/X11/rgb.txt though, so please check whether it 
has moved. I'm curious as to why (only) R/tcltk would be confused by 
this sort of thing.
#
G'day Peter,

On Sun, 05 Apr 2009 11:26:40 +0200
Peter Dalgaard <p.dalgaard at biostat.ku.dk> wrote:

            
Apparently it has:

berwin at berwin5:~$ apt-file find rgb.txt
[...]
x11-common: /usr/share/X11/rgb.txt
[...]

However, 

berwin at berwin5:~$ ls -l /usr/share/X11/rgb.txt
lrwxrwxrwx 1 root root 16 Jan 14 03:28 /usr/share/X11/rgb.txt -> /etc/X11/rgb.txt
berwin at berwin5:~$ more /usr/share/X11/rgb.txt
/usr/share/X11/rgb.txt: No such file or directory

Cheers,
	
	Berwin
#
Peter Dalgaard wrote:
If you check here:

https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/300935

You will find many other unhappy apps:
emacs
xterm
vnc
freeNX
netpbm
x3270
stage

and any others that uses names in place of rgb codes for X11.

Like one of the posters said, I don't care for arguing whether or not the
file should be made obsolete or not.  All I know is, removing it breaks some
very basic programs.

- Ken
#
Ken-JP wrote:
OK, now I get it. Apparently, some people believe that because "yellow" 
does not internationalize, everyone should use "#ffff00" which is 
equally cryptic in all languages....

Still not sure what the exact Tk angle is. Looks like tk8.5 has 
internalized the color table. Other applications have just copied 
rgb.txt to some place where they can find them.
#
On 5 April 2009 at 03:33, Ken-JP wrote:
| If you check here:
| 
| https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/300935
| 
| You will find many other unhappy apps:
| emacs
| xterm
| vnc
| freeNX
| netpbm
| x3270
| stage
| 
| and any others that uses names in place of rgb codes for X11.
| 
| Like one of the posters said, I don't care for arguing whether or not the
| file should be made obsolete or not.  All I know is, removing it breaks some
| very basic programs.

As I read, this was a bug in new Ubuntu installations, and it seems to have
been corrected.  

Dirk