Skip to content
Prev 131596 / 398502 Next

Using R function in Excel

Dear John,

The R Workbench (biocep project) comes with a powerful Spreadsheet view
fully connected to an R session. you can use it to do exactly what you
want and it has much more features :

 from within the spreadsheet view you can :
        *import any R Data (numeric, integer, character, logical, complex,
factor, matrix, data frame ) via the toolbar button import from R
(R+arrow towards the spreadsheet)
        *export selected cells to R and assign the content of the cells to
an R variable via the toolbar button export to R (R+arrow towards
R)
         you specify the type of export (numeric, integer, character,
logical, complex, factor, data frame )
         for data frame, you should append to the column name the type of
the column between parathesis ("weight(integer)",
"mesure1(numeric)", "state(factor)", ..)
        * Evaluate an R expression and use the current selection as
argument (the toolbar button R evaluate (R+ruuning man))
         for example you can type "t(%%)" in the R Expression field. This
transposes the selected cells matrix. The result is sent to the
clipboard and you can paste on will
        * type in a cell an expression to evaluate and use any R fucntion,
example in A4 type "=mean(A1:A3)" the content of A4 will be
computed using R fucntion mean and the
         cell value will be the mean of the vector A1:A3. all the R
functions dealing with numeric vectors or matrixes can be used
        * Copy/Paste to and from Excel
        * create as many SpreadSheet Views as needed and specify the
suitable dimensions

on windows and Mac OS, you can use this link to install the R Workbench
http://www.ebi.ac.uk/microarray-srv/frontendapp/rworkbench.jnlp

for more information :
http://www.ebi.ac.uk/microarray-srv/frontendapp/BIOCEP_README.txt

Karim