Publications by fabiomarroni

Introduction to R (Milano R course)

25.05.2012

I am happy to repost the information I got about the course “Introduction to R” that will be organized by Milano R net in collaboration with Quantide. The course will be held in Milano, Italy, June 7-8, 2012, and is intended to introduce the unexperienced user to R. For furhter info visit milano R net blog. Related To leave a comment f...

720 sym 4 img

R and theater

03.06.2012

You might ask what R has to do with theater. I assure you it has. I act in the theater group ‘ndescenze. We will soon present (actually, we just performed) a show based on the Marx Brothers Radio Shows. We shuffle actors and characters during the show (we like it complicated!) and we needed to find at least one sequence of scenes which allowed ...

3602 sym R (6935 sym/4 pcs) 4 img

Summarize content of a vector or data.frame every n entries

08.08.2013

I imagine that the same result can be achieved by a proper use of quantile, but I like to have an easy way to obtain summary statistics every n entries of my dataset be it a vector or data.frame. The function takes three parameters: the R object on which we need to obtain statistics (x), how many entries should each summary contain (step, default...

943 sym R (1727 sym/3 pcs) 4 img

Reading large data tables in R

02.05.2014

Ok, I confess. Until yesterday I was one of those still trying to read large data tables using read.table. Then, I came across this thread in stackoverflow and I saw the light. Since I noticed that a lot of people still struggle with read.table I decided to write this very brief post. Imagine that you have your large file named “mylargefile.txt...

850 sym R (53 sym/1 pcs) 4 img

Perform pairwise Wilcoxon test, classify groups by significance and plot results

25.03.2017

This post is the result of work performed in collaboration with my colleague Eleonora Paparelli (who actually did most of the work!). We wanted to compare several distributions using Wilcoxon test and summarize results (i.e. indicate the comparisons showing significant differences). R base includes pairwise.wilcox.test to perform Wil...

1441 sym R (904 sym/1 pcs) 4 img

Visualize KEGG pathway and fold enrichment

14.11.2017

As a useful note to self, I paste here an easy example on the use of the pathview package by Weijun Luo to plot the log fold change of gene expression across a given KEGG pathway. This example is on Vitis vinifera (as the prefix vvi can suggest), but the approach is general. Basically, you just need to feed pathview the pathway argument and a gen...

1030 sym R (757 sym/1 pcs) 6 img

Stouffer’s meta-analysis with weight and direction effect in R

15.05.2018

I often have to perform meta-analysis of past experiments for which the only info I have is the fold change and the p-value (of any measure you may imagine: species richness, gene expression, depth of coverage, plates of carbonara eaten in 5 minutes, everything). The hardest thing to find out for me was how to take the direction of the changes in...

1692 sym R (420 sym/1 pcs)

Use R to write multiple tables to a single Excel file

07.08.2018

The possibility of saving several tables in a single file is a nice feature of Excel. When sharing results with colleagues, it might be useful to compact everything in a single file. As a bioinformatician, I am too lazy to do that manually, and I searched the web for tools that allow doing that. I found out that there are at least two R packages ...

2066 sym R (495 sym/4 pcs)

Nice tables in R

04.03.2020

I used to think that making nice table in R is not worth the effort. However, after changing my mind for the billionth time on relatively large tables for a paper and do not wanting to reformat them again from scratch, I gave a try to the formattable package, and I liked it very much. I post here some basic formats I learnt from the web. Note: I ...

2026 sym R (958 sym/3 pcs) 6 img