Hi all- Thanks in advance for your help. I have a 2275x1 table of residuals from an lm() regression. I want to analyze this further in Excel. I tried using: df<-resid(object) write.table(df) and this yields a nice looking output in R, but because of screen constraints, I seem to loose data "out-the-top" of the Console -- which doesn't bother me, as long as I can see it eventually. But when i clicked on the RGui tool bar File|Save to file|, etc., only what I could see in the Console seemed to be saved to the text file. Obviiously, I am a newbie -- How can I get the entire output into this textfile? Again, thanks! Enjoy the Holiday weekend!
Not getting all data to a text file via write.table
3 messages · rwatkins@cornerstonelp.com, Spencer Graves, Peter Dalgaard
?write.table reveals a second argument "file". Have you considered "write.table(df, 'df.csv')"? I've imported *.csv files produced by "write.table" into Excel many times, so I think this should work for you. By the way, "df" is the density function for the F distribution. It is also the degrees of freedom argument for Student's t distribution functions, etc. It is therefore considered poor style to use "df" as the name of a data.frame or some other object. hth. spencer graves
rwatkins at cornerstonelp.com wrote:
Hi all- Thanks in advance for your help. I have a 2275x1 table of residuals from an lm() regression. I want to analyze this further in Excel. I tried using: df<-resid(object) write.table(df) and this yields a nice looking output in R, but because of screen constraints, I seem to loose data "out-the-top" of the Console -- which doesn't bother me, as long as I can see it eventually. But when i clicked on the RGui tool bar File|Save to file|, etc., only what I could see in the Console seemed to be saved to the text file. Obviiously, I am a newbie -- How can I get the entire output into this textfile? Again, thanks! Enjoy the Holiday weekend!
______________________________________________ R-help at stat.math.ethz.ch mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
<rwatkins at cornerstonelp.com> writes:
Hi all- Thanks in advance for your help. I have a 2275x1 table of residuals from an lm() regression. I want to analyze this further in Excel. I tried using: df<-resid(object) write.table(df) and this yields a nice looking output in R, but because of screen constraints, I seem to loose data "out-the-top" of the Console -- which doesn't bother me, as long as I can see it eventually. But when i clicked on the RGui tool bar File|Save to file|, etc., only what I could see in the Console seemed to be saved to the text file. Obviiously, I am a newbie -- How can I get the entire output into this textfile?
There's a file= argument to write.table. That's the right way to do it, but you can increase the amount saved in the console too, on the GUI Preferences menu I think.
O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907