Sunday, October 28, 2012

customizing R


On windows:
C:\Program Files\R\R-2.15.1\etc\Rprofile.site


My Rprofile with added custom color schemes

# Things you might want to change

# options(papersize="a4")
# options(editor="notepad")
# options(pager="internal")

# set the default help type
# options(help_type="text")
  options(help_type="html")

# set a site library
# .Library.site <- file.path(chartr("\\", "/", R.home()), "site-library")

# set a CRAN mirror
# local({r <- getOption("repos")
#       r["CRAN"] <- "http://my.local.cran"
#       options(repos=r)})

# Give a fortune cookie, but only to interactive sessions
# (This would need the fortunes package to be installed.)
if (interactive()) {
   fortunes::fortune()
   
   #---- custom color schemes
   library(grDevices)
   blue.colors = colorRampPalette(RColorBrewer::brewer.pal(9,"Blues"))
   jet.colors = colorRampPalette(c("blue","#007FFF","cyan","#7FFF7F","yellow","#FF7F00","red"))
   blackBody.colors = colorRampPalette(c("black", "red", "orange","yellow","lightyellow"),space="rgb")
}


Wednesday, October 24, 2012

Struggling with mounting shared directory on VirtualBox

some good info

1) Run as sudo VBoxLinuxAdditions.run
1a) sudo sh ./VBoxLinuxAdditions.run
2) make directory e.g. HostData in /home/d3m629/ folder
3) Set what is shared is VirtualBox itself
4) sudo mount -t vboxsf -o uid=MYUSERNAME Google_Drive ~/HostData
5) then add this to /etc/init.d/rc.local or ? /etc/rc.local
5a) mount -t vboxsf -o uid=MYUSERNAME Google_Drive /home/MYUSERNAME/HostData
6) enter HostData directory and bookmark it for easy access.

Obviously MYUSERNAME has to be replaced with the actual one.


Another thing to do after installing Ubuntu on VirtualBox running on Mac is ...
Keyboard Layout -> Options -> Alt/Win Key behavior ->  Control is mapped to Win keys (and the usual Ctrl keys)

In case of Xubuntu.
Run
setxkbmap -option altwin:ctrl_win
To make the change permanent
echo -option altwin:ctrl_win >>~/.Xkbmap
original doc


Changing themes for Unity

Checking font availability on Mac   fc-list : family | grep "Fira Code"   or   system_profiler -json SPFontsDataType | grep \...