Articles by fabiomarroni

Nice tables in R

March 4, 2020 | 0 Comments

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 ...
[Read more...]

Use R to write multiple tables to a single Excel file

August 7, 2018 | 0 Comments

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 ... [Read more...]

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

May 15, 2018 | 0 Comments

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 ... [Read more...]

Visualize KEGG pathway and fold enrichment

November 14, 2017 | 0 Comments

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 ... [Read more...]

Reading large data tables in R

May 2, 2014 | 0 Comments

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 ... [Read more...]

R and theater

June 3, 2012 | 0 Comments

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 ... [Read more...]

Introduction to R (Milano R course)

May 25, 2012 | 0 Comments

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 ... [Read more...]

Milano R net meeting

April 24, 2012 | 0 Comments

I received the announce of the first Milano R net meeting, and I am glad to post it below. If you are based in Milano area you might think about going. If you are not based in Milano area, you might think about going as well! Milano R net Milano ... [Read more...]

Count different positions between two strings of equal length

November 26, 2011 | 0 Comments

This is another pretty simple function, written to help me solve the simplest representation of a trivial but tedious task. Most biologist are probably familiar with this task. How many nucleotide differences exist between two given sequences? I only faced the easiest part of the problem, i.e. I do ... [Read more...]

Estimate decay of linkage disequilibrium with distance

August 9, 2011 | 0 Comments

It is well known that linkage disequilibrium (LD) decays with distance. Several functions have been proposed to estimate such decay. Among the most widely used are the Hill and Weir (1) formula for describing the decay of r2 and a formula proposed by Abecasis (2) for describing the decay of D’. I ... [Read more...]

For happy-R blogging

May 3, 2011 | 0 Comments

You may notice that I don’t have that many posts on my blog, and they are all about R. The paucity of my posts makes me a bit sad, but not much, really… What makes (or better, used to make me) sad is that posts of R code (used ... [Read more...]

Estimate Gene Diversity

May 3, 2011 | 0 Comments

I provide here an R function to estimate gene diversity of diallelic sites (e.g. SNPs), given allele frequencies at each segregating site. The function takes three input parameters: maf: a numeric value (or vector) representing minor allele frequency at each site. Default is 0.5 nreads: size of each resampling experiment. ... [Read more...]

R function to convert degrees to radians

December 23, 2010 | 0 Comments

I would have never imagined that I would have to go back to high school concepts and do strange trigonometric calculations. However, it happened to me that I needed to convert GPS coordinates of a large data set to radians. It’s a trivial task, if you know how to ... [Read more...]

R function to reverse and complement a DNA sequence

November 13, 2008 | 0 Comments

Warning!! This post is intended for documentation only. I would like to remind everyone (me in first place!) that the comp() function of the (seqinr) package can complement a DNA sequence, and rev() function of Rbase can reverse a character vector. Using a combination of the two you can reverse, ... [Read more...]

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)