Monthly Archives: January 2012

installing rpy2 with different R version already installed

The easiest way to install a python package is to use easy_install (or pip), so to install rpy2, type: easy_install rpy2 To test that it is properly installed, type: import rpy2; from rpy2 import robjects; robjects.r(“version”) If this code works, … Continue reading

Posted in Computer Science, Linux, Python | Tagged , , , , | 8 Comments

Installing repositories under Centos 6.2 to get ipython, R and other packages

I installed Centos 6.2 and tried to install some packages such as ipython or R but they were not available like many other useful packages that are available by default in other distribution such as Fedora. The solution is to … Continue reading

Posted in Linux | Tagged , | 1 Comment

SED: replace a pattern in all files in one command

I have a bunch of c files and I want to change the first line that appears as //something into /*something Using sed, you can use the command ‘s/old_pattern/new_pattern/g’ where -e stands for edition, and -i to apply the changes. … Continue reading

Posted in Linux | Tagged | Leave a comment

crontab usage

Under Linux/Unix, tasks can be run automatically at a given time and regular intervals. Those tasks are store within the crontab (CRON TABle) that is a file which contains the schedule of cron tasks. Crontab Restrictions To prevent a user … Continue reading

Posted in Linux | Tagged | Leave a comment