[R] pdf() and histogram() in function call

2008-04-23 Thread qian z
Here is a function I wrote. It runs no problem, but generate empty pdf files. I can't find what is the problem. create.pdf<- function(x, dir) { dir.create(dir, showWarnings = FALSE) plist<- c("a", "b" , "c", "d") for(j in plist) { filedir<- paste(dir,

[R] merge in function

2007-12-06 Thread qian z
I used merge() in a function, but it doesn't return correct data frame. add.name <- function(data, x) { ... ... newfile <- merge(data, resid, by =0, all.x=TRUE, all.y= FALSE) newfile } - [[alternative H

[R] options$max.print

2007-11-16 Thread qian z
I am working on a dataset. Some data appear in scientific notation format, such as 5.8237365731e-05. Right now I want them appear as decimal format. I try to use options(max.print=”10”), but it doesn’t work. How do I fix it? Thanks. --