Posts

Showing posts from October, 2015

Creating Circular Distribution Graphs in R (Useful for Angular Data)

Creating Circular Distribution Graphs in R (Useful for Angular Data) Below is an example of creating circular distribution/density plots. It could be useful while exploring angular data, where, for example, the value of 360 degrees is equal to the value of 0 degree, hence a circular representation is more appropriate. In the computational biology context, this type of graphs could be useful to explore dihedral angle distribution in, say, a set of protein or nucleic acids structures, or, with some modifications, to explore distribution of a certain parameter along a circular genome. We need the R library circular , so if that is not installed, install from within R using the command below: install.packages ( "circular" ) Let us create an example dataset: data.vector <- c ( 120 , 125 , 149 , 35 , 360 , 245 , 9 , 76 , 243 ) If our dataset contains negative angles, for instance, angles in the \([-180,180)\) range, we can change the ...