haotu : an open lab notebook

2017/07/18

Make ggplot look like base plot in R

Filed under: ggplot, R, R graphics — Tags: , , , , , , — S @ 04:46
myplot + theme_bw() + theme(panel.border = element_blank(), panel.grid.major = element_blank(), panel.grid.minor = element_blank(), axis.line = element_line(colour = "black"))
myplot + theme_bw() + theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(), axis.line = element_line(colour = "black"))

here

 

 

 

2014/11/07

Error in write.table because data.frame contains a list

Filed under: Uncategorized — Tags: , , , — S @ 06:42

Error in .External2(C_writetable, x, file, nrow(x), p, rnames, sep, eol, :
unimplemented type 'list' in 'EncodeElement'

I got this error when trying to write a table write.table on an object. The object was a data.frame but one of the elements was a list (it is unclear why it was a list, just R magic). The simplest workaround is to convert the data.frame to a matrix as.matrix and save that object with write.table

2013/03/18

Get the R code for the functions of a package

Filed under: Uncategorized — Tags: , , , , , — S @ 03:58

Download the tab ball from Cran and extract the gz to get the tar. Then extract the tar.

 

I use 7zip since it is free!

 

Look in the R folder, the code you are searching for will be there.

Create a free website or blog at WordPress.com.