Install R (statistical computing language) on Puppy 2.14

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
acaza
Posts: 22
Joined: Thu 12 Apr 2007, 00:40

Install R (statistical computing language) on Puppy 2.14

#1 Post by acaza »

Mark (MU) was good enough to help me get R running on my computer. I'm passing on the steps I used, so that Mark doesn't have to repeat his work with the next person who can't figure out how to install it. This was for multi-session 2.14, so there may be some small tweaks if you have a different setup.

1. download all items in R-2.4.0 file at http://dotpups.de/dotpups/

2. install them by clicking on the downloaded dotpups
R.2.4.0 (just acknowledge the message about the link it creates)
libg2c
less (click okay to overwrite /usr/bin/less)

then use PETget: menu > setup > puppy package manager > PETget package manager > 2nd button (about installing downloaded package)
navigate to the "alien.packages" file select it

3. download: http://noforum.de/dotpups/libreadline-so-4.pup and install it. R creates a link to the libreadline.so.4 library, but that didn't exist in my puppy. I guess it's a dependency that got missed?

4. At this point, R will run
menu > utility > Rxvt terminal emulator
type: R [just the letter, must be capitalized]

However, I needed R functions that weren't already installed. I get these with the command, inside R, "install.packages." This signals R to download and compile the functions I request. But as part of the function, R uses the "make" command. For that to work, Puppy needs to have the development tools for compiling installed.

5. To get those, go to http://puppylinux.org/wikka/Compiling and get what you need. For me, this was devx for 2.14

If I'd been running from live CD with a pup_sav file, I suppose I would just load this sfs file like any other, but I'm using multi-session DVD, so I had to do this:
download the devx_214.sfs file
save it on HARD DRIVE (I don't know why, but the commands below won't work if I save the devx_214.sfs file in ramdisk)
open a terminal in the directory where I saved the file (right click > window > terminal here)
type these commands into the terminal:
# mkdir mntpt
# losetup /dev/loop2 devx_214.sfs
# mount -t squashfs /dev/loop2 mntpt
# cp -a --remove-destination mntpt/* /

6. One more weird step. I don't know what's up with this, but R is convinced that it has to use the Mandrake compiler. To work around that problem, create a link to trick R into thinking that it is getting the Mandrake compiler when it really gets the Puppy one. Type this into a terminal:
# ln -s /usr/bin/gcc /usr/bin/i586-mandrake-linux-gnu-gcc

At this point, I was all set. Both update.packages and install.packages work, so I can get the functions I need in R.

Thank you, Mark
aspiring hacker trapped in the mind of a linux noob, using Puppy 2.14 multisesson DVD on Dell XPS M1210
User avatar
gary101
Posts: 555
Joined: Sun 08 Oct 2006, 09:51
Location: Boston, Lincs. UK

#2 Post by gary101 »

Please excuse my ignorance, but what is R ?
acaza
Posts: 22
Joined: Thu 12 Apr 2007, 00:40

#3 Post by acaza »

R is a statistical computing language. You can use it to do the sorts of things that you would do in commercial packages like SAS or SPSS, only R is free and does a whole lot more.

More info here: http://www.r-project.org/
aspiring hacker trapped in the mind of a linux noob, using Puppy 2.14 multisesson DVD on Dell XPS M1210
raffy
Posts: 4798
Joined: Wed 25 May 2005, 12:20
Location: Manila

Thanks

#4 Post by raffy »

Thanks, Mark-a (MU is Mark, too, so he must be Mark-u).

I should test it over a weekend, but maybe not this but next. :)

Should you come up with a list of "R install packages" usually used in college, feel free to post. Maybe I try to build sfs of those.
Puppy user since Oct 2004. Want FreeOffice? [url=http://puppylinux.info/topic/freeoffice-2012-sfs]Get the sfs (English only)[/url].
acaza
Posts: 22
Joined: Thu 12 Apr 2007, 00:40

#5 Post by acaza »

Raffy,

I'm actually Arran (not another Mark). My confusing post was meant to thank THE Mark (MU), who really did all the work.

In terms of R's most used packages, it would depend on what you're studying. I'm in psychology, so I tend to use the inferential statistics stuff associated with GLM. If you were inclined to create an sfs for that, I suggest looking at the R package called Rcmdr. It's meant to be GUI front end for the R language. I find the GUI less useful than actual scripting, but if you look at it's dependencies, they are 25-30 of the most essential GLM-related packages. That would probably be a great place to start for an sfs bundle.

Arran (the puppy user formerly known as Mark-a)
aspiring hacker trapped in the mind of a linux noob, using Puppy 2.14 multisesson DVD on Dell XPS M1210
disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#6 Post by disciple »

It is at http://dotpups.de/dotpups/Office/R/R-2.4.0/, and go up for the other dotpups.
User avatar
hayden
Posts: 61
Joined: Thu 14 Sep 2006, 01:49
Location: New Hampshire USA

#7 Post by hayden »

This may be a bit late but I thought I would contribute to this thread in return for what I learned from it. I recenlty tried to install R in Puppy 2.14, had trouble, searched the Forum, missed this thread, and started another

http://www.murga-linux.com/puppy/viewto ... 568#173568

on which someone steered me here.

I agree that Rcmdr's dependencies are a good place to start, and Rcmdr is good for beginners. Still, it does not provide flexibility AND ease of use the way Minitab does.
Plus the version now at CRAN requires R 2.6;-(

For anyone who wants to LEARN R you can access the examples I created for my two-semester intro. stats. sequence at

http://courses.statistics.com/software/help.php

which also has limited support for Rcmdr. If you want more detail I recommend the book on using R in an intro. course by John Verzani. This is for users whereas most of the official R documentation is for programmers. There is a UsingR package to go with it.

Re installation, I used a symbolic link to libreadline.5.1.so for libreadline.4.so The installer created a menu item for R that caused X to freeze when I clicked on it. No trouble running R from a console.
disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#8 Post by disciple »

I suspect the s20x library might be the most widely used (or perhaps useful) library.

That CD you're talking about doing would be great Hayden. But like Muggins said, the second to last version of Rkward was for QT 3, so it would still be good.
pmg is a gtk gui for R that might also be worth checking out.
muggins
Posts: 6724
Joined: Fri 20 Jan 2006, 10:44
Location: hobart

#9 Post by muggins »

Disciple,

I think I scanned too quickly! As hayden pointed out, in the other thread, it also requires kde header files to compile.
muggins
Posts: 6724
Joined: Fri 20 Jan 2006, 10:44
Location: hobart

#10 Post by muggins »

This link has possible Gui front-ends for R:

http://www.sciviews.org/_rgui/

I wonder if this one:

http://datamining.togaware.com/survivor ... tails.html

just requires a working gtk installation, or the full gnome?
ymer
Posts: 16
Joined: Fri 18 May 2007, 22:20

#11 Post by ymer »

disciple wrote:It is at http://dotpups.de/dotpups/Office/R/R-2.4.0/, and go up for the other dotpups.
With all respects, why it is located inside of Office category, while it should be in Science. I was browsing through dotpups.de today to see if there is any R package, looked into Science and then Programming, never though about Office actually which has probably nothing to do with R. So might be a good idea to move the package to Science section.
Neolynx
Posts: 2
Joined: Sat 17 Jan 2009, 05:55

Missing library "libg2c.so.0"

#12 Post by Neolynx »

Thanks for making R available on puppy, all. I got halfway through the instructions above but couldn't run R due to "libg2c.so.0: cannot open shared object file."

I'm brand spankin' new to Linux so was clueless for a while, but finally found help on another distro forum. I guess this is an outdated library that gets left out of newer versions (?)

Anyway, I extracted libg2c.so from http://www.fluvial.ch/download.html into /usr/lib and voila.

Hope that helps somebody else. Anyone know if one of the newer R versions has been compiled for puppy?
emil
Posts: 633
Joined: Tue 10 Nov 2009, 08:36
Location: Austria
Contact:

R as pet for puppy 4.31

#13 Post by emil »

I have compiled R and made a simple pet package.
Dont know exactly about the dependencies, but I have the devx431.sfs and gfortran installed too.

I opened a new thread, download link is there.
More Math soft.

Servus
Emil
Post Reply