Publications by Paolo
R Journal 1/1
R Journal 1/1 is out! Download it from here. Related To leave a comment for the author, please follow the link and comment on their blog: One R Tip A Day. R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job....
454 sym 4 img
Nice Interview
Here you can read a nice interview with David Smith, REvolution Computing’s Director of Community, statistician and bloggeR. Related To leave a comment for the author, please follow the link and comment on their blog: One R Tip A Day. R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topic...
522 sym 4 img
Two plot with a common legend – base graphics
If you need to share a common legend between two graphs using the ggplot2 package/paradigm take a look at this post from the Learning R blog.The code below solves the same task using the R base graphics.png( "2plot1legend.png", width = 480, height = 680) par(mfrow = c(2, 1), oma = c(0, 0, 0, 2)) plot(hp~mpg, data=mtcars, col=cyl,pch=1...
1057 sym 6 img
Replacing 0 with NA – an evergreen from the list
This thread from the R-help list describe an evergreen tip that, at least once, is proved useful in R practice. Related To leave a comment for the author, please follow the link and comment on their blog: One R Tip A Day. R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here i...
509 sym 4 img
Iran Election analyzed with R
Here you can find a very interesting post depicting the R strengths in ‘real-time statistics’. I’d like to use the occasion to thank David Smith for hosting the best, imho, blog on R! Follow Him on Twitter: @revodavid . Related To leave a comment for the author, please follow the link and comment on their blog: One R Tip A Day. R-blo...
619 sym 4 img
Set the significant digits for each column in a xtable for fancy Sweave output
This tip may be useful in the situations when you need to set the number of digits to print for the different columns in a matrix/data.frame to be outputted as a LaTeX table. For example: #install.packages("xtable") #library(xtable) tmp <- matrix(rnorm(9), 3, 3) xtmp <- xtable(tmp) digits(xtmp) <- c(0,0,3,4) print(xtmp, incl...
897 sym 4 img
Remove files with a specific pattern in R
A quick basic tip which can come in handy whether you need to rapidly remove files from a directory:junk <- dir(path="your_path", pattern="your_pattern") # ?dir file.remove(junk) # ?file.removeClearly, for advanced needs, you can use system() and all the unix tools installed onto your machine. Related To leave a comment for the aut...
705 sym 4 img
Rosetta Code
Today I’d like to suggest the interesting Rosetta Code site:Rosetta Code is a programming chrestomathy site. The idea is to present solutions to the same task in as many different languages as possible, to demonstrate how languages are similar and different, and to aid a person with a grounding in one approach to a problem in learni...
903 sym 4 img
Locate the position of CRAN mirror sites on a map using Google Maps
Inspired by this post (suggested here by the always useful Revolutions blog), I attempted to plot the position of CRAN mirrors on a map taking advantage of the nice R package RgoogleMaps (check the dependencies!). Below the code: library(XML) # download.file("http://www.maths.lancs.ac.uk/~rowlings/R/Cranography/cran.gml",destfile="c...
3830 sym 8 img
R Flashmob #2
As I said before, I consider the R-Help mailing list an invaluable source of information if you want to get things done in R. Recently the stackoverflow website, a site where programmers can post and answer questions about a wide list of programming languages, has been populated with a lot of questions and answers regarding R thanks t...
1240 sym 4 img