Re: [R] Writing the output of a regression object to a file

2011-07-20 Thread Hanlie Pretorius
Thanks for the reply.

write.table(esvr.pred) worked - I got data out that's been scaled back
to its original range of values.

2011/7/19, Bert Gunter gunter.ber...@gene.com:
 If I understand you correctly,


 I would like to export the esvr.pred object to a file so that I can
 draw a graph of it against my original data in other software that I'm
 using.


 you cannot do this. You can export **data**, but of course any R
 object is either a binary or text (via dput) representation of an R
 structure, which can only be understood by R, not another software
 system.

 See ?write, ?write.table, or the R import/export manual for how to
 export data (as text) to be imported by other software.


 Cheers,
 Bert


 Bert Gunter
 Genentech Nonclinical Biostatistics


__
R-help@r-project.org mailing list
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.


[R] Writing the output of a regression object to a file

2011-07-19 Thread Hanlie Pretorius
Hi,

I'm using R 2.12.0 on Windows XP.

I've used the e1071 package to tune a Support Vector Regression object
and I've created the SVR object:

 epsilon.svr - svm(C8R004 ~.,data = rain_flow.train, scale = T, type = 
 eps-regression,
+ kernel = radial, cost = 0.9, epsilon=0.55,tolerance=0.001,
shrinking=T, gamma=0.18,fitted=T)
 esvr.pred - predict(epsilon.svr,newdata = rain_flow.test)

I would like to export the esvr.pred object to a file so that I can
draw a graph of it against my original data in other software that I'm
using.

I've tried the write.svm command, but that outputs the scaled data
instead of something that I can directly compare to my original data.

Does anyone know of an easy way to get the result such a format?

Alternatively, how can I use the scale values to generate such a format?

Thanks
Hanlie

__
R-help@r-project.org mailing list
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.


Re: [R] Writing the output of a regression object to a file

2011-07-19 Thread Bert Gunter
If I understand you correctly,


 I would like to export the esvr.pred object to a file so that I can
 draw a graph of it against my original data in other software that I'm
 using.


you cannot do this. You can export **data**, but of course any R
object is either a binary or text (via dput) representation of an R
structure, which can only be understood by R, not another software
system.

See ?write, ?write.table, or the R import/export manual for how to
export data (as text) to be imported by other software.


Cheers,
Bert


Bert Gunter
Genentech Nonclinical Biostatistics

__
R-help@r-project.org mailing list
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.