Saturday, October 22, 2016

Switch User Second Graphical Login

For some incomprehensible reason Switch User is greyed out. Can do it from the command line:

$ dm-tool switch-to-user anaconda


Debian Firefox Iceweasel YouTube Videos Don't Work : Set HTML5 player


sudo apt install gstreamer1.0-libav


https://www.youtube.com/html5

Check H.264 available, set html5 to be default player

Oh, I must go down to the R again : R cran packages emacs ESS installing libraries scripting

Debian Jessie (22nd October 2016)

The latest version of R is available via:

$ sudo apt install r-recommended 

Many R packages are also debian packages

So ggplot2 scales and dplyr can be installed like:

sudo apt install r-cran-ggplot2 r-cran-scales r-cran-dplyr

Those that are not can be installed from R itself thus:

$ R
> install.packages('mice', dep = TRUE)

Not available errors here are likely because the mirror you've chosen doesn't have the packages, the UK mirrors always seem incomplete. use CA1 in America for best results.

To load the library:


> library("ggplot2")

The best way to use R seems to be through EMACS. Install the ess package, which should recognise .R files

Type:


(ess-toggle-underscore nil) C-x C-e

In an emacs scratch window to get rid of the insanely annoying perversion of the underscore key, or put

(add-hook 'ess-mode-hook
          (lambda ()
            (ess-toggle-underscore nil)))


in .emacs

It is possible to make R scripts, but *obviously* this:

#!/usr/bin/R
cat("hello\n")



doesn't work, for reasons.

This is one way:

#!/bin/sh
R --slave --vanilla <
cat("hello\n")

EOF


But you can't write filters like this

littler works fairly well as I remember:


$ sudo apt-get install r-cran-littler

#!/usr/bin/r 
cat("hello\n")

http://dirk.eddelbuettel.com/code/littler.examples.html


and there's a newer Rscript thingy, not clear which is better

Wednesday, October 19, 2016

Installing Python Pandas and Ipython on Debian Jessie

sudo apt install ipython-notebook python-pandas python-numpy python-tornado python-jinja2 python-matplotlib

ipython notebook --pylab inline


(or for the python 3 versions:)

sudo apt install ipython3-notebook python3-pandas python3-numpy python3-tornado python3-jinja2 python3-matplotlib

ipython3 notebook --pylab inline