Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 01 Oct 2014, 00:42
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Engineering/Science/Simulation
R - statistics package and scripting language
Post new topic   Reply to topic View previous topic :: View next topic
Page 3 of 6 [82 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6 Next
Author Message
Puppyt

Joined: 09 May 2008
Posts: 568
Location: Gatton, Queensland

PostPosted: Wed 19 Jan 2011, 03:48    Post subject:
Subject description: R-puppy
 

Many Thanks emil for your kind sympathies - much appreciated. I live just off Postmans' Ridge Road and while my family and property was largely untouched, a very many of our little communities are living through 4 different kinds of hell at the present. Trying not to think about it, so a little Puppy remastery disastery is light relief.

Thanks too for the heads-up on your Sagelithe puplet - I hope to have a look at that later. For my personal use I frequently just extract the 3-4 key files from a Puplet ISO for a manual frugal install (five Puppy5's and a couple of Puppy4's on my Toshiba Portege 3480CT, without PCMCIA support. I use 7-zip in WinXP for that and can burn ISO's like the 'open' or 'multi' CD's in Puppy, using the latest CDBurnerXP). Actually creating my own puplet or backup CD copy with all the programs most useful for my profession - just as hayden was aiming for his students - well that's another matter. Wheels keep falling off for me in the 'automated' remasterings. Might not be so complicated for me if I didn't charge off like a bull through two different gates at the same time. Perhaps a "how-to" on manual remastering would be useful to clarify the issue (for a LOT of perpetual noobs like myself), but only later if you have the time.

Is a "R / RCommander" puppy possible with your pets or might there be a script or patch (or symlink solution) to keep all the cogs together when a remastery for the masses (not installation on a case-by-case basis) is warranted? Would that get around the (usually expected) mount-from-/ recompile problem hayden and myself seem to be having? It seems a waste to have to use the 'other' installation and remaster option through WINE - though I get the strong impression from your last message and your earlier-suggested workaround that RCmdr is the bugbear. Sorry if I ramble - you can tell I'm no programmer,

Thanks Again

_________________
Toowoomba Linux Community
http://groups.google.com/group/toowoombalinux
Back to top
View user's profile Send private message Visit poster's website 
emil

Joined: 10 Nov 2009
Posts: 618
Location: Austria

PostPosted: Wed 19 Jan 2011, 06:39    Post subject:  

Remaster will only work when all the files are in the "/" section and not in "/mnt" section. Creating symlinks there will only confuse the matter further.

1) Option: use sagelithe, install Rcmdr there, then remaster that - everything is in "/sage"

2) Option: recompile R with -prefix=/opt/R.2.12.2 (or similar), install Rcmdr from that R, then remaster that (possibly also create optional pet package from that directory tree)

R seems the most used package, you need it for your job?
greetings
emil
Back to top
View user's profile Send private message Visit poster's website 
emil

Joined: 10 Nov 2009
Posts: 618
Location: Austria

PostPosted: Wed 19 Jan 2011, 17:25    Post subject: Rcmdr sfs  

I made an sfs of Rcmdr, which installs to /opt/R-2.12.1 - this is included by the usual remaster scripts. Made in Lupq 511, briefly tested in 520.
gfortan 44.3 and TclTk8.5 are included in the sfs, so only missing dependency is Xorg-High for 3d-plotting.

Download: http://sage.math.washington.edu/home/emil/MathSoftware/Puppy5/

Start with R from terminal, or with menu entry in Business (category Calculator).
Start Rcmdr with library(Rcmdr) from inside R.

Cookbook R sfs:
As stated the difficulty is that you have to compile Rcmdr from inside R, so usual new2dir for pet production doesn't work. So I did the following (its out from top of my head, more like a reminder to myself). If you find something is wrong please correct me.

downloaded r source to /mnt/home/Compile, and unzipped it to
/mnt/home/Compile/R-2.21.1

loaded devx.sfs, installed gfortran pet and tclTk8.5 pet. then:
check if enough enough space left in savefile (600 MB, OK).

open terminal
Code:
cd /mnt/home/Compile/R-2.12.2
mkdir bld                                      # create build directory
cd bld
../configure -prefix=/opt/R-2.12.1      #set the final installation directory
make
make check                                   #hopefully no errors detected
make install                                   # Version A: build R+ Rcmdr sfs
# new2dir make install-strip              # Version B: build just R pet
# /opt/R-2.12.1/bin/R
# demo(graphics)                          # Version B: test, if works
# cd /mnt/home/Compile
# now add any menu entries, symlinks etc to directory R-2.12.1-i386
# dir2pet R-2.12.1-i386                   # use TAB completion - it rocks!
# End Version B creation of only R - pet
# (Rcmdr can be installed from inside R anytime)
/opt/R-2.12.1/bin/R                          # Version A - Follow up:run R
install.packages("Rcmdr", dependencies=TRUE)      #install Rcmdr
demo(graphics)                              # quick test
library(Rcmdr)                                # quick test of Rcmdr
Ctrl-D                                           # leave R
cd /mnt/home/Compile/R-2.12.1        # have done no stripping yet
mkdir -p R-2.12.1-sfs-dir/opt                       #make a coppy of the installation
# maybe there is an error while stripping, so better keep the original
# also your savefile could become full when you create sfs in "/" range,
# so better switch to /mnt/home
cp -nvr /opt/R-2.21.1 ./R-2.21.1-sfs-dir/opt      # prepare this dir- tree also for sfs creation
cd R-2.12.1-sfs-dir #


Ok, in my work with the sage installation I have used a little script which uses the package fslint (scripts which find double files and hardlinks them, google - Bash/Python mix). The script also strips all binaries in the directory tree. So we use this to check/strip the R package
Code:
#--striptree.sh --
#!/bin/sh
# replace double files with hardlinks in all directory tree
findup -m .
# strip executables
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : |
xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null


This saves ~ 40 MB

strip, then test again the stripped R-tree:
Code:
striptree.sh
./opt/bin/R                  # cross fingers and start R
demo(graphics)          # works
library(Rcmdr)            # seems to work too
mkdir -p ./usr/bin          # create a Symlink so R is in the path
ln -s ./opt/bin/R ./usr/bin/R   
# simliar create menu entries and include icons etc,
# maybe weed out some bloat manually
# when finish do
cd ..
dir2sfs R-2.12.1-sfs-dir             #produce our new R sfs package
mv R-2.12.1.sfs /mnt/home        # shift it to /mnt/home
rm -r /opt/R-2.12.1         # delete installation: Oops!
# mv /opt/R-2.12.1 to_backup_location   # maybe better to keep the original

list our R.sfs in the bootmanager, Reboot and then hopfully it works.
Hey hayden and puppyt - hope this works for an R-Pup!
Regards
Cool emil

Last edited by emil on Thu 20 Jan 2011, 06:09; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
Puppyt

Joined: 09 May 2008
Posts: 568
Location: Gatton, Queensland

PostPosted: Thu 20 Jan 2011, 05:20    Post subject:
Subject description: R-puppy soon...
 

Dear emil -

this is absolutely marvelous, THANK YOU Very Happy

I regret that my bandwidth has been choked (broadband wireless in regional Queensland is a criminal AU$80/mo for 6GB up/down thanks to a national monopoly) - but will be able to download and install late tonight.

With regard to your earlier query, emil, I think I wrote waaaay back when somewheres in the Puppy forums that there was a rapid increase in use of statistical modeling in fields related to animal behavior research. 'R' plays a starring role in that shift away from 'traditional' hypothesis-testing techniques of data analysis - as a quick scan of leading journals like "Animal Behavior" over the last decade testifies. There is a site put together for behavioral ecologists here https://bestat.ecoinformatics.org/ with tutorials for the use of R being added all the time. [Thanks hayden for posting your earlier link for introductions to the use of R - I'll be looking into those in more detail later.]

Thanks too for your very helpful SFS 'cookbook' emil - fingers crossed that this numpty could replicate that pathway if ever needed - or alternatively risk loading the Sid (Lenny) r-dev package into something like Dpup or Insidious Puppy. (Reckon I'll design a t-shirt for myself with the "Perpetual Noob" motif.) I'll let you know how your SFS goes in a pristine Lupu 520,

Cheers!

_________________
Toowoomba Linux Community
http://groups.google.com/group/toowoombalinux

Last edited by Puppyt on Thu 10 Mar 2011, 07:56; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website 
emil

Joined: 10 Nov 2009
Posts: 618
Location: Austria

PostPosted: Thu 20 Jan 2011, 05:58    Post subject:  

Hi puppyt,

sorry I remember you told me back than about your animal research!
Actually R compiles quite smoothly, the package is well tended.
It's definitly one of the easier pieces of source.

Last year I wrote that maybe there will never be an easy pet/sfs of R, but you see, one year later experience and increased skill make me find it easy.
The cookbook looks of course very difficult writing up all those terminal commands. Maybe there is even a shorter possibility but I am happy that this worked so well (you never know before).

I hope that the pathway is useful because I think R is a "should have" package for all puppy versions, but I fear most need there own version compiled. Hm, I add a line to the description about making an R.pet, Rcmdr can always be installed from inside that with the second part of the cookbook.

Maybe you could eventually help with looking into the package and see what else could be stripped out or shifted to DOC / LANG packages. I guess with 145 MB it is still too heavy (the core R is ca 20 MB) so Rcmdr pulls in lots of stuff! That would be great!

kind regards
emil
Back to top
View user's profile Send private message Visit poster's website 
Puppyt

Joined: 09 May 2008
Posts: 568
Location: Gatton, Queensland

PostPosted: Fri 21 Jan 2011, 03:21    Post subject:
Subject description: R-puppy
 

Thanks again emil for your R SFS...
ummmm how do you get it going in Lupu520 Embarassed? Bootmanager refuses to see it in my setup.
I've tried renaming, sfs conversions etc but cannot get it up and running, from terminal. There are residue menu entries for R and R commander in Business>Calculate> despite my uninstalling the earlier pets - maybe they didn't remove correctly, are there directories you might recommend manual removal or will they be over-written once the SFS is correctly installed?
I'd love to help out with your other suggestion of streamlining - can't seem to get the first ball rolling at present...

_________________
Toowoomba Linux Community
http://groups.google.com/group/toowoombalinux
Back to top
View user's profile Send private message Visit poster's website 
emil

Joined: 10 Nov 2009
Posts: 618
Location: Austria

PostPosted: Fri 21 Jan 2011, 04:07    Post subject: Residual memory entries  

Hm,

Ok, that could be a problem - The following could happen: when removing the pet while the sfs is already mounted it leaves "delete marker files" in the respective directories, so the menu entries and symlinks from the sfs are masked.

First, try to go to /opt/R-2-12-1/bin and start R from there manually with ./R

Then try the following:

open Rox manager and open /initrd/mnt/pup_ro4 (this is the savefile layer).
go to /usr/bin/ and enable "hidden files" (eye icon. If there is a ".R" file this is the masked symlink. The same applies for the file /usr/share/applications/R.dektop
delete the marker files, then you should see the files from the sfs layer! (maybe you have to reboot).

Interesting, but a good example what could happen if you have the same files in parallel pet and sfs packages.
Could you please look if this works? would be interesting.
emil
Back to top
View user's profile Send private message Visit poster's website 
emil

Joined: 10 Nov 2009
Posts: 618
Location: Austria

PostPosted: Fri 21 Jan 2011, 05:06    Post subject: Sorry  

Didn't read carefully: your bootmanager doesn't see it?
hmm, I think I tested it with 5.20 fresh.
---
I tested it again, fresh 5.20, R.sfs copied to /mnt/home, detected, loaded and runs flawless?

Sometimes in the past I had problems with sfs ending in numbers, Puppy wouldn't recognise them. if it finds the wrong version number. In that case I renamed, so please try renaming the sfs from
R-Rcmdr-2.12.1-lup511.sfs
ro
R-Rcmdr-2.12.1-lup.sfs

Cool emil

PS: md5sum = a6994ebb5c3d0a8feb57ce2fb4fcfa48 R-Rcmdr-2.12.1-lup.sfs
Back to top
View user's profile Send private message Visit poster's website 
Puppyt

Joined: 09 May 2008
Posts: 568
Location: Gatton, Queensland

PostPosted: Fri 21 Jan 2011, 07:30    Post subject:  

Wow - thanks for all your attention on the matter, emil -

I was in the process of updating my progress but you've beaten me to the punch - I made these steps:
1) wiped the offending build and reloaded a fresh, full install of Lupu 520 on an EXT3-formatted partition. Still no luck with installing the R-Rcmdr SFS (from /mnt/home).
2) downloaded another SFS via Quickpet (lupu_devx_520.sfs) and rather than install directly, moved it from /tmp to /mnt/home so that it could be read by the Bootmanager. Bootmanager fails to register any SFS. "Sorry, there are no SFS files....or they have the wrong *_nnn.sfs version number)..."
3) Tried your renaming suggestion, and others (e.g., R-Rcmdr_520.sfs). No dice.
4) X-server restarts fail to remedy the issue, and nor does a reboot -
5) Tried SFS Converter 1.3 (no success earlier with R-Rcmdr , nor just now with lup_devx_520.sfs)

- I'm about to now try reformatting to EXT2 if that is an issue, and then re-try with Lupu511. First I'm re-downloading your SFS, in the likely case that my first download was imperfect. (I couldn't get your latest version loaded in MacPuppy511, EXT2 partition just now, despite renaming to *_511.sfs, etc) If that fails I don't know what my next option would be. Would you consider at some stage a "retro" R-Rcmdr SFS, for puppy4?
cheers...

PS AHA - the md5sum...checking now...

PPS jup - same md5sum as your latest/renamed SFS. Trying the 'scorched earth' partition again now...

_________________
Toowoomba Linux Community
http://groups.google.com/group/toowoombalinux
Back to top
View user's profile Send private message Visit poster's website 
emil

Joined: 10 Nov 2009
Posts: 618
Location: Austria

PostPosted: Fri 21 Jan 2011, 08:42    Post subject:  

That leaves me completly puzzled Sad .
Just try something else before you start a repartition circus Wink
Can you mount the sfs by clicking on it in Rox manager?

then you could navigate to the /opt/bin folder and try to start R from there.
You could even copy out the files, recreate sfs etc. That would be a starter!
Back to top
View user's profile Send private message Visit poster's website 
emil

Joined: 10 Nov 2009
Posts: 618
Location: Austria

PostPosted: Fri 21 Jan 2011, 12:22    Post subject: the small world full  

I noticed the following Exclamation :

Quote:
fresh, full install of Lupu 520


Are you really using a full install? - you know you cant use sfs files under full install with the Bootmanager!

You have to extract the contents out of the sfs and copy it directly to the partition. Either use a frugal install, or:

Code:
2. Click on the devx_xxx.sfs in a ROX-Filer window to mount it.
3. Open a terminal in the mounted directory.
6. # cp -a --remove-destination ./* /mnt/hda2/
7. # sync
8. Close the terminal.
9. Click on the devx_xxx.sfs file to unmount it


instead of /mnt/hda2/ you have to write the name of the root partition of your full install (like given in GRUB)

taken from http://www.puppylinux.com/hard-puppy.htm

Sorry I have to read more carefully what people tell me ... Could have told you that hours before!

Good Luck!
emil

PS: I use frugal install!
Back to top
View user's profile Send private message Visit poster's website 
Puppyt

Joined: 09 May 2008
Posts: 568
Location: Gatton, Queensland

PostPosted: Fri 21 Jan 2011, 13:41    Post subject:  

DOH! Embarassed

I forgot completely about that little nuance - normally I use frugal religiously, but in this case I wanted to dedicate a partition to a puppy "project".

Thanks! Will review that again in a few hours after sleeeep (nearly 4am here!)



(Off-screen: sound of head hitting desk. Several times. With increasing ferocity...)

_________________
Toowoomba Linux Community
http://groups.google.com/group/toowoombalinux
Back to top
View user's profile Send private message Visit poster's website 
emil

Joined: 10 Nov 2009
Posts: 618
Location: Austria

PostPosted: Fri 21 Jan 2011, 14:15    Post subject:  

Hey PuppyT, take it easy Very Happy and good night!

I found frugal install much better suited for development (just have big enough savefile, like 1,5 GB) and keep sources and data in the /mnt/home range.

It is much more flexible and save:
1) main sfs is readonly
2) you can make backups of your savefiles to restore a "healthy state"
3) your installations and testinstalls keep small

emil
Back to top
View user's profile Send private message Visit poster's website 
Puppyt

Joined: 09 May 2008
Posts: 568
Location: Gatton, Queensland

PostPosted: Sat 22 Jan 2011, 00:47    Post subject:
Subject description: R-puppy lives...
 

It's ALIVE!

Thanks for taking the trouble spoon-feeding me through that installation, emil - manually deleted my FULL installation directories (leaving your R.SFS behind) and doing a FRUGAL install. Bootmanager spotted the SFS immediately on startup [EDIT: I had it named R-Rcmdr-2.12.1_520.sfs], and away we go...
I note that you now have the 'R' menu entry straight under the 'Business' category, and no 'R Commander'. For my intended audience - needing as little R syntax as possible - I contrived to have R-Commander load automatically, following the directions here http://socserv.mcmaster.ca/jfox/Misc/Rcmdr/installation-notes.html and modifying the Rprofile file in /opt/R-2.12.1/lib/R/base/R/Rprofile. Now R Commander loads nearly instantly. YAY! Cool

I reckon if (anyone) wanted to really showcase 'R' in puppy you could also install JGUIR (but pre-installing the JRE pet), PMG and some of the other GUI's. RKWard might run under the minimum KDE environment PET dejan555 posted somewheres - although I think that was for Puppy4. Of course, providing a Firefox or Seamonkey with a string of R tutorials and other resources bookmarked would also be helpful for a "Beginners R-puppy". For a more integrated learning tool I would consider also adding Zotero (now it also runs in SeaMonkey - Yipeee!) with a library of links and articles included with the puplet.

But now I'm way off my brief. Finalising this little "Ethology" puplet project I'm loading the ImageJ pet (http://www.murga-linux.com/puppy/viewtopic.php?p=319184#319184) and the latest CowLog (http://mpastell.com/cowlog/) for image and video analysis and their integrated R packages from CRAN. Nuff play - back to work...

Thanks yet again, emil!


P.S. I think I'll scrap the idea of a "Perpetual Noob" t-shirt and just have it tattoo'd on my forehead - around the desk splinters.

_________________
Toowoomba Linux Community
http://groups.google.com/group/toowoombalinux
Back to top
View user's profile Send private message Visit poster's website 
Puppyt

Joined: 09 May 2008
Posts: 568
Location: Gatton, Queensland

PostPosted: Thu 27 Jan 2011, 23:07    Post subject:
Subject description: Remastering with R-Rcmdr
 

Cheers again emil-

I've been trying to remaster Lupu 520 with extensions to your great R-Rcmdr SFS. I've included the CowLog deb (listed previously in thread) and had to download the KDE Kommander and associated dependencies from Ubuntu, and it works seamlessly. (In my remaster I've also included the package databases for Ubuntu-lucid-main and -multiverse.) R is hooked up to start RCmdr automatically, and I've updated various R packages, including 'Animal' for CowLog.
I've then run into problems trying to install ImageJ http://www.murga-linux.com/puppy/viewtopic.php?p=319184 and the R packages 'RImageJ' and 'rJava'. ImageJ works but the packages can't seem to link properly with java despite (near-)successful use of "R CMD javareconfig" in terminal. As you highlight in your explanation on another thread here http://www.murga-linux.com/puppy/viewtopic.php?t=62222&sid=e9f49ca2de300d70c1afa0d23b7128fd - Puppy uses a different Java installation path in its official pets and sfs. Perhaps that is where I am having problems, and will try tallthom's approach with a direct download and install from Oracle. I bet that would help with remaster problems anyway. I'll email again if it works for the R packages.
Couldn't find your java pet for traditional savefile installs, I guess you removed it?

Any thoughts on the matter would be greatly received...

_________________
Toowoomba Linux Community
http://groups.google.com/group/toowoombalinux
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 3 of 6 [82 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Engineering/Science/Simulation
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1171s ][ Queries: 13 (0.0058s) ][ GZIP on ]