Articles by Xianjun Dong

line width in R and in Illustrator

December 17, 2012 | Xianjun Dong

I've drawn figure in R with lwd=1, e.g.pdf('test.pdf')plot(1:10, type='o', lwd=2, axes=F)box(lwd=1, col='red')dev.off()And then you open the PDF in Illustrator, you will see the border width is 0.75pt, and the line is 1.5pt, which seems that the unit ... [Read more...]

draw figures in CMYK mode in R

October 31, 2012 | Xianjun Dong

Print publication usually ask to use CMYK (instead of RGB) color mode for figures (because not every color can be print out), while we usually use RGB for screen reading (because screen has larger range of color scale). Of course we can convert RGB to ... [Read more...]

difference between NA and NaN in R

August 23, 2012 | Xianjun Dong

We usually see NA and NaN in R. What's the difference between them?Here a good post for that topic:http://stats.stackexchange.com/questions/5686/what-is-the-difference-between-nan-and-naIn summary here:NaN ("Not a Number") means 0/0NA ("Not Available") is generally interpreted as a missing value and has various forms - NA_integer_, ... [Read more...]

bubble plot in R

July 18, 2012 | Xianjun Dong

Motived by the post from FlowingData(http://flowingdata.com/2010/11/23/how-to-make-bubble-charts/), I made this plot with R code below:par(mfrow=c(3,1), mar=c(4,6,4,4))for(ty in c("protein_coding","lincRNA","piRNA")){          ... [Read more...]

about boxplot

June 15, 2012 | Xianjun Dong

From Wiki:"... the bottom and top of the box are always the 25th and 75th percentile (the lower and upper quartiles, respectively), and the band near the middle of the box is always the 50th percentile (the median). But th... [Read more...]

whisker of boxplot

June 15, 2012 | Xianjun Dong

From Wiki:"... the bottom and top of the box are always the 25th and 75th percentile (the lower and upper quartiles, respectively), and the band near the middle of the box is always the 50th percentile (the median). But the ends of the whiskers can represent several possible alternative values..."... [Read more...]
1 2 3

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)