[R] Save the results of data analysis in R

2011-06-16 Thread amrita gs
Hi everyone,

I want to do data analysis using the values retrieved from a MySQL
database. Is there a way to save the results of data analysis in R.

[[alternative HTML version deleted]]

__
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] Save the results of data analysis in R

2011-06-16 Thread Jim Lemon

On 06/16/2011 07:12 PM, amrita gs wrote:

Hi everyone,

 I want to do data analysis using the values retrieved from a MySQL
database. Is there a way to save the results of data analysis in R.


Hi amrita,
If you mean save the output of an analysis, there are several ways.

1) Enter sink(filename) before running the analysis, and sink() 
after. This will store the results of whatever you did between the two 
sink commands in the file filename (which is the name you choose to 
call it).


2) Write your analysis as a script and use a function like htmlize to 
convert the output to HTML and store it. This allows you to get most 
bitmapped plots embedded in the output, which is what many people want.


For both of the above, you will want to write and test the R script 
until it runs correctly, then use sink or htmlize (or other 
functions from, say, the R2HTML package) to do the conversion. There are 
similar functions that will convert the output to document formats like 
Latex if you want.


Jim

__
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] Save the results of data analysis in R

2011-06-16 Thread Paul Hiemstra
 On 06/16/2011 09:23 AM, Jim Lemon wrote:
 On 06/16/2011 07:12 PM, amrita gs wrote:
 Hi everyone,

  I want to do data analysis using the values retrieved from a MySQL
 database. Is there a way to save the results of data analysis in R.

 Hi amrita,
 If you mean save the output of an analysis, there are several ways.

...and if you mean save the R objects you need to look at save().

cheers,
Paul


 1) Enter sink(filename) before running the analysis, and sink()
 after. This will store the results of whatever you did between the two
 sink commands in the file filename (which is the name you choose
 to call it).

 2) Write your analysis as a script and use a function like htmlize
 to convert the output to HTML and store it. This allows you to get
 most bitmapped plots embedded in the output, which is what many people
 want.

 For both of the above, you will want to write and test the R script
 until it runs correctly, then use sink or htmlize (or other
 functions from, say, the R2HTML package) to do the conversion. There
 are similar functions that will convert the output to document formats
 like Latex if you want.

 Jim

 __
 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.


-- 
Paul Hiemstra, Ph.D.
Global Climate Division
Royal Netherlands Meteorological Institute (KNMI)
Wilhelminalaan 10 | 3732 GK | De Bilt | Kamer B 3.39
P.O. Box 201 | 3730 AE | De Bilt
tel: +31 30 2206 494

http://intamap.geo.uu.nl/~paul
http://nl.linkedin.com/pub/paul-hiemstra/20/30b/770

__
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.