Monday, 16 July 2012

Vim Regular Expressions

http://vimregex.com/

Wednesday, 20 June 2012

Good vimrc resources

Examples of changing spelling highlight modes

http://bodhizazen.net/Tutorials/vimrc


And another resource from Amir Salihefendic http://amix.dk


http://amix.dk/blog/post/19691#The-ultimate-Vim-configuration-on-Github

http://amix.dk/vim/vimrc.html

Monday, 11 June 2012

Yumex Authentication in Openbox

add the next line to your autostart script


(sleep 1 && /usr/libexec/polkit-gnome-authentication-agent-1) &

Tuesday, 10 April 2012

how to use empty 'which()' results in R?

As the function returns a vector, for the cases in which the function does not find any cases matching the criteria it will return a vector length of zero

> length(which(borders$end == bands[b,'start']))
[1] 0

Friday, 9 March 2012

How to write on the same line in R?

You can achieve this by using the old trick of the carriage return '\r' and the command cat()

for ( i in 1:100){
    cat(c('\r   ',i))
}

Will print on the same line each number from 1 to 100

Thursday, 1 March 2012

How to substitute 'NA' in R for any other desired value


my.table$column[is.na(my.table$column)] <- 0