Skip to content
Back to formatted view

Raw Message

Message-ID: <4DF9CB91.4040505@bitwrit.com.au>
Date: 2011-06-16T09:23:29Z
From: Jim Lemon
Subject: Save the results of data analysis in R
In-Reply-To: <BANLkTimFP8bpY+VPYvZw3P9nCETnDJ_vAA@mail.gmail.com>

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