Dear Rxperts.. Was wondering if there is a way in R to read a csv file and generate an XPT file? For some reason the function write.xport() does not seem to work for me.... i get the following error... "error in label.data.frame(df,default=""): length of default same as x
A sample dataframe is given below xg2 <- data.frame(aa=runif(10),bb=sample(runif(100),10)) SASformat(xg2$aa) <- 'Numeric2' SASformat(xg2$bb) <- 'Numeric2' label(xg2$aa) <- "test aa" label(xg2$bb) <- "test bb" label(xg2) <- "testa" SAStype(xg2) <- "TestXge" write.xport(xg2,file="A1.xpt") Error in label.data.frame(df, default = "") : length of default must same as x Any suggestions/tips are welcome.. Thanks and regards Santosh [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.