Re: [R] I need help integrating ggplot2 into Excel

From: Greg Snow <Greg.Snow_at_imail.org>
Date: Thu, 20 Mar 2008 12:21:16 -0600

I expect that this is the same as FAQ 7.22, though the FAQ should probably be updated to include ggplot as well as lattice/trellis.

Basically you need to "print" the graph (in some modes it is automatically printed, so you see it, in other modes it is not autoprinted, so you see nothing), just wrap the calls in print() commands.

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow_at_imail.org
(801) 408-8111
 
 


> -----Original Message-----
> From: r-help-bounces_at_r-project.org
> [mailto:r-help-bounces_at_r-project.org] On Behalf Of Jannik Vindeloev
> Sent: Thursday, March 20, 2008 8:16 AM
> To: r-help_at_r-project.org
> Subject: [R] I need help integrating ggplot2 into Excel
>
>
> Dear all
>
> I use ggplot2 extensively for my plotting routines and rexcel
> to have the best of two worlds. (RExcel v 1.75 and R (D)Com v. 2.5)
>
> I can run my ggplot functions, such as qplot(...), in
> scratchpad mode, but not in Macro nor Worksheet functions mode.
>
> I have tried the following in Macro mode:
>
> Call RInterface.RRun("library(ggplot2)")
> ...
> Call
> RInterface.RRun("qplot(x=Hours,y=pH,data=ds,facets=Sample~.,ge
> om=""line"",group=Cell)")
>
> With no output ...

>
> I have tried the following in Worksheet function mode:
>
> if Range(H40:I42) contains:
> "
> (Embedded image moved to file: pic10654.jpg) "
> and Range(H48) contains:
>
> "qplot"
>
> The following call:
>
> =Rcalla(H48;makeargs(H40:I42))
>
> Gives me no output
>
> Scratchpad mode
>
> However, right clicking a cell containing:
> qplot(x=Hours,y=pH,data=ds,facets=Sample~.,geom=""line"",group=Cell)
> and then selecting "Run R" works like a dream!
>
> I would like to develop an excel based GUI for R-data
> treatment and plotting, and I would like to use ggplot2 as my
> plotting engine.
>
> What am I doing wrong?
>
> Thank you for your help
>
> Jannik VindelÝv, Ph.D.
> Project Manager
> Dairy Culture Development
> Innovation
>
> P.O. Box 64
> Arpajon
> Cedex
> F-91292
> France
>
> Phone: +33 (0)1 6988 3636
> Direct Phone: +33 (0)1 6988 3629
>

______________________________________________ R-help_at_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.
Received on Thu 20 Mar 2008 - 18:27:05 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 20 Mar 2008 - 19:30:26 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive