Tag: installation

R and the proxy server

R is a “a free software environment for statistical computing and graphics“. Being a desktop software, R is working out-of-the-box, even if you don’t have a network connection. However, if you want to install packages using a repository on the internet, you need a network connection (of course). If your computer happens to be behind a proxy server, you have to slightly modify your shortcut (in MS-Windows) to allow R to download packages. This can be done by modifying the “Target” field in the “Shortcut” tab of the shortcut properties (right-click on the shortcut to R, select tab “Shortcut”, edit field “Target”):

"C:\Program Files\R\R-2.12.2\bin\i386\Rgui.exe" http_proxy=http://proxyaddress:80 http_proxy_user=ask

Adapt the path to your R version, change the string “proxyaddress” by your proxy (see this previous post for a tip on this) and you’re done!

Because I never remember them, I’ll conclude this post with standard commands related to the installation of a packages:

Installing packages in R:
> install.packages("packageName", repos = "http://cran.ma.imperial.ac.uk/", dependencies = TRUE)

Notes:

  • You might get a window asking you for your firewall credentials and to choose a mirror server
  • CRAN repositories can be found here: http://cran.r-project.org/
  • This will download and install the package again, even if it is already installed

Updating packages in R:
> update.packages("deSolve") # for the deSolve package, for example

Know all packages installed in R on your computer:
> libraries()

Finally, here is a R reference card that can be useful too.

Installing Pwytter on Fedora 11

This morning, it was impossible to post tweets on Twitter so I finally gave in to install a Twitter client. Amongst many software available, Pwytter seemed interesting to try: free software, written in Python were my two criteria.

Unfortunately, the installation process is not straightforward (although its use of the general python setup procedure). Here is how to install it on Fedora 11 from the command line:

  1. Download Pwytter, unzip it, enter directory pwytter-0.8
  2. Install ImageTK: as root, type “yum install python-imaging-tk” (in Fedora, ImageTK was renamed python-imaging-tk)
  3. Install simplejson: as root, type “yum install python-simplejson
  4. (optional) launch: python setup.py build
  5. launch: python setup.py install
  6. Complete the installation by copying some files with the 4 lines below (type them as root too) (a comment in pwytter blog helps to solve the pwCache installation bug):
cp pwCache.py /usr/lib/python2.6/site-packages/pwytter-0.8-py2.6.egg
cp pwCache.pyc /usr/lib/python2.6/site-packages/pwytter-0.8-py2.6.egg
cp -r media/ /usr/lib/python2.6/site-packages/pwytter-0.8-py2.6.egg
cp -r theme/ /usr/lib/python2.6/site-packages/pwytter-0.8-py2.6.egg

Now you can launch pwytter from any user! In addition, since the source code is available and Identi.ca supports a Twitter-compatible API, let’s see if it’s easy to modify pwytter for Identi.ca 🙂

pwytter screenshot