[R] VennDiagram

2014-08-26 Thread Jurgens de Bruin
Hi,

I am new to R and dont use it very often so I would appreciate some help.

I would like to create a VennDiagram based on the following, I have
analyzed experimental results using different methods and captured the
results of each analysis.
I would like the VennDiagram to show the overlap in results for the
different analysis.

Sample data:
 Analysis   Results
   A  1-5
   B   8-9
   C   4-7
   B   1-5
   A   20-50
   C   8-9

So in this simple example analysis A and B have a single sample overlap and
Analysis B and C also have a single overlap but C and A have no overlap.


-- 
Regards/Groete/Mit freundlichen Grüßen/recuerdos/meilleures salutations/
distinti saluti/siong/duì yú/привет

Jurgens de Bruin

[[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] VennDiagram

2014-08-26 Thread Jurgens de Bruin
Hi,,
Thanks for the link, I have tried that but it seems my data is in the wrong
format for that to work.


On 26 August 2014 10:35, João Azevedo Patrício  wrote:

> Em 26-08-2014 09:30, Jurgens de Bruin escreveu:
>
>  Hi,
>>
>> I am new to R and dont use it very often so I would appreciate some help.
>>
>> I would like to create a VennDiagram based on the following, I have
>> analyzed experimental results using different methods and captured the
>> results of each analysis.
>> I would like the VennDiagram to show the overlap in results for the
>> different analysis.
>>
>> Sample data:
>>   Analysis   Results
>> A  1-5
>> B   8-9
>> C   4-7
>> B   1-5
>> A   20-50
>> C   8-9
>>
>> So in this simple example analysis A and B have a single sample overlap
>> and
>> Analysis B and C also have a single overlap but C and A have no overlap.
>>
>>
>>  Hi,
>
> I don't know how to do it, but made a search and found this, see if it
> helps you
>
> http://www.ats.ucla.edu/stat/r/faq/venn.htm
>
> --
> João Azevedo Patrício
> Tel.: +31 91 400 53 63
> Portugal
> @ http://tripaforra.bl.ee
>
> "Take 2 seconds to think before you act"
>
> __
> 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.
>



-- 
Regards/Groete/Mit freundlichen Grüßen/recuerdos/meilleures salutations/
distinti saluti/siong/duì yú/привет

Jurgens de Bruin

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


[R] Highlight selected bar in barplot

2013-07-31 Thread Jurgens de Bruin
Hi All,

I am new at R so any help would be appreciate.

Below my current R-code/script:

initial.dir<-getwd()
setwd('/Users/jurgens/VirtualEnv/venv/Projects/QTLS/Resaved_Results')
dataset <- read.table("LWxANNA_FinalReport_resaved_spwc.csv", header=TRUE,
sep="\t" )
n <- length(dataset$X..No.Call)
x <- sort(dataset$X..No.Call,partial = n )[n]

outlier <- dataset[ dataset$X..No.Call > quantile(dataset$X..No.Call,0.25)
+ (IQR(dataset$X..No.Call) *1.5),]

par( las=2,  cex.axis=0.5, cex.lab=1, cex.main=2, cex.sub=1)
barplot(dataset$X..No.Call, names.arg = dataset$Individual.Sample,
cex.names=0.5 ,space=0.5, ylim=c(0,x*1.5) )
setwd(initial.dir)

I would like to highlight the sample in outlier on the barplot that is
create, would this be possible?


Thanks
-- 
Regards/Groete/Mit freundlichen Grüßen/recuerdos/meilleures salutations/
distinti saluti/siong/duì yú/привет

Jurgens de Bruin

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


[R] Fwd: Highlight selected bar in barplot

2013-08-05 Thread Jurgens de Bruin
-- Forwarded message --
From: Jurgens de Bruin 
Date: 2 August 2013 08:51
Subject: Re: [R] Highlight selected bar in barplot
To: Greg Snow <538...@gmail.com>


Hi,

Apologies for the late reply...

Attached is a dataset. Hope this help.

So I draw a barplot based on the dataset. Then using the following:

outlier <- dataset[ dataset$X..No.Call > quantile(dataset$X..No.Call,0.25)
+ (IQR(dataset$X..No.Call) *1.5),]
to identify samples/bars that I would like to color a different color than
the rest.

Thanks gain



On 1 August 2013 18:05, Greg Snow <538...@gmail.com> wrote:

> You may be interested in the iplots package.  It has methods where you can
> create multiple plots and select a point or points in one plot and they
> will be highlighted on the other plots.
>
>
> On Wed, Jul 31, 2013 at 8:57 AM, Jurgens de Bruin wrote:
>
>> Hi All,
>>
>> I am new at R so any help would be appreciate.
>>
>> Below my current R-code/script:
>>
>> initial.dir<-getwd()
>> setwd('/Users/jurgens/VirtualEnv/venv/Projects/QTLS/Resaved_Results')
>> dataset <- read.table("LWxANNA_FinalReport_resaved_spwc.csv", header=TRUE,
>> sep="\t" )
>> n <- length(dataset$X..No.Call)
>> x <- sort(dataset$X..No.Call,partial = n )[n]
>>
>> outlier <- dataset[ dataset$X..No.Call > quantile(dataset$X..No.Call,0.25)
>> + (IQR(dataset$X..No.Call) *1.5),]
>>
>> par( las=2,  cex.axis=0.5, cex.lab=1, cex.main=2, cex.sub=1)
>> barplot(dataset$X..No.Call, names.arg = dataset$Individual.Sample,
>> cex.names=0.5 ,space=0.5, ylim=c(0,x*1.5) )
>> setwd(initial.dir)
>>
>> I would like to highlight the sample in outlier on the barplot that is
>> create, would this be possible?
>>
>>
>> Thanks
>> --
>> Regards/Groete/Mit freundlichen Grüßen/recuerdos/meilleures salutations/
>> distinti saluti/siong/duì yú/привет
>>
>> Jurgens de Bruin
>>
>> [[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.
>>
>>
>
>
> --
> Gregory (Greg) L. Snow Ph.D.
> 538...@gmail.com
>



-- 
Regards/Groete/Mit freundlichen Grüßen/recuerdos/meilleures salutations/
distinti saluti/siong/duì yú/привет

Jurgens de Bruin



-- 
Regards/Groete/Mit freundlichen Grüßen/recuerdos/meilleures salutations/
distinti saluti/siong/duì yú/привет

Jurgens de Bruin
__
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] Categorical bubble plot

2011-05-03 Thread Jurgens de Bruin
So I have been playing with bubble plot and I was able to create bubble plot
with relatively simple data. I am no having problems when I increase the
complexity of my data. Below is a example of my data:

phytochemicalMainClassFitValues
Name A   0.5
 A0.7
 A0.8
 B0.1
 B0.4
 B0.6

Phytochemical in on the y-axis and MainClass on the x-axis and FitValues is
the color and size of the bubble so each x-y has more than one FitValue.
Will the following still Work?

bubble = ggplot2.ggplot(dataf) + \
ggplot2.aes_string(x='mainclass', y='phytochemcial',
col='fitvalue',size='fitvalue') + \
ggplot2.geom_point()

This is done in rpy2 so it may not look like R.

Thanks!!!

On 21 April 2011 09:49, Jurgens de Bruin  wrote:

> Thanks for all the help!!!
>
>
> On 16 April 2011 08:32, Tal Galili  wrote:
>
>> Hi Jurgens,
>>
>> In the following post I show how to use balloonplot from qplots to do
>> more or less what you ask:
>>
>> http://www.r-statistics.com/2010/02/nutritional-supplements-efficacy-score-graphing-plots-of-current-studies-results-using-r/
>>
>> p.s: the code has a slight modification to it, so to handle overlapping
>> texts.  Dear Jim, I'd be happy if some of it might be considered into the
>> official release.
>>
>> Cheers,
>> Tal
>>
>> Contact
>> Details:---
>> Contact me: tal.gal...@gmail.com |  972-52-7275845
>> Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
>> www.r-statistics.com (English)
>>
>> --------------
>>
>>
>>
>>
>> On Fri, Apr 15, 2011 at 4:19 PM, Ben Bolker  wrote:
>>
>>> On 04/15/2011 01:13 AM, Jurgens de Bruin wrote:
>>> > Thanks for the reply...
>>> >
>>> > with reproducible I am believe you require a dataset?
>>>
>>>   yes -- but you can make one up if you like.  e.g.
>>>
>>>
>>> dd <- expand.grid(drugclass=LETTERS[1:5],
>>>   plant=c("cactus","sequoia","mistletoe"))
>>> set.seed(101)
>>> dd$fitvalue <- runif(nrow(dd))
>>>
>>> library(ggplot2)
>>> ggplot(dd,aes(x=drugclass,y=plant,colour=fitvalue,size=fitvalue))+
>>>  geom_point()
>>>
>>>  By the way, I think you could represent your data much more
>>> clearly this way: the "Cleveland hierarchy" says that it's easier
>>> to assess quantitative values plotted along a common scale than via
>>> size or colour ...
>>>
>>> ggplot(dd,aes(x=drugclass,y=fitvalue,colour=plant))+
>>>  geom_point()+geom_line(aes(group=plant))
>>>
>>>
>>>
>>> > The size of the bubbles will be related to the fitvalues.
>>> >
>>> >
>>> >
>>> > On 14 April 2011 17:57, Ben Bolker >> > <mailto:bbol...@gmail.com>> wrote:
>>> >
>>> > Jurgens de Bruin  gmail.com <http://gmail.com>>
>>> writes:
>>> >
>>> > >
>>> > > Hi,
>>> > >
>>> > > I do not have much R experience just the basics, so please excuse
>>> > > any obvious questions.
>>> > >
>>> > > I would like to create bubble plot that have Categorical data on
>>> > the x and y
>>> > > axis and then the diameter if the bubble the value related to x
>>> and y.
>>> > >  Attached to the email is a pic of what I would like to do.
>>> > >
>>> >
>>> >  A reproducible example would be great.
>>> >
>>> > something along the lines of
>>> >
>>> > library(ggplot2)
>>> >
>>> ggplot(mydata,aes(x=drugclass,y=plant,colour=fitvalue,size=?))+geom_point()
>>> >
>>> >  it's not clear from your description what determines the size.
>>> >  From a labeling point of view, switching x and y might be useful.
>>> >
>>> > __________
>>> > R-help@r-project.org <mailto:R-help@r-project.org> mailing list
>>> > h

Re: [R] Categorical bubble plot

2011-04-14 Thread Jurgens de Bruin
Thanks for the reply...

with reproducible I am believe you require a dataset?

The size of the bubbles will be related to the fitvalues.



On 14 April 2011 17:57, Ben Bolker  wrote:

> Jurgens de Bruin  gmail.com> writes:
>
> >
> > Hi,
> >
> > I do not have much R experience just the basics, so please excuse
> > any obvious questions.
> >
> > I would like to create bubble plot that have Categorical data on the x
> and y
> > axis and then the diameter if the bubble the value related to x and y.
> >  Attached to the email is a pic of what I would like to do.
> >
>
>   A reproducible example would be great.
>
> something along the lines of
>
> library(ggplot2)
> ggplot(mydata,aes(x=drugclass,y=plant,colour=fitvalue,size=?))+geom_point()
>
>  it's not clear from your description what determines the size.
>  From a labeling point of view, switching x and y might be useful.
>
> __
> 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.
>



-- 
Regards/Groete/Mit freundlichen Grüßen/recuerdos/meilleures salutations/
distinti saluti/siong/duì yú/привет

Jurgens de Bruin

[[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] Categorical bubble plot

2011-04-21 Thread Jurgens de Bruin
Thanks for all the help!!!

On 16 April 2011 08:32, Tal Galili  wrote:

> Hi Jurgens,
>
> In the following post I show how to use balloonplot from qplots to do more
> or less what you ask:
>
> http://www.r-statistics.com/2010/02/nutritional-supplements-efficacy-score-graphing-plots-of-current-studies-results-using-r/
>
> p.s: the code has a slight modification to it, so to handle overlapping
> texts.  Dear Jim, I'd be happy if some of it might be considered into the
> official release.
>
> Cheers,
> Tal
>
> Contact
> Details:---
> Contact me: tal.gal...@gmail.com |  972-52-7275845
> Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
> www.r-statistics.com (English)
>
> --
>
>
>
>
> On Fri, Apr 15, 2011 at 4:19 PM, Ben Bolker  wrote:
>
>> On 04/15/2011 01:13 AM, Jurgens de Bruin wrote:
>> > Thanks for the reply...
>> >
>> > with reproducible I am believe you require a dataset?
>>
>>   yes -- but you can make one up if you like.  e.g.
>>
>>
>> dd <- expand.grid(drugclass=LETTERS[1:5],
>>   plant=c("cactus","sequoia","mistletoe"))
>> set.seed(101)
>> dd$fitvalue <- runif(nrow(dd))
>>
>> library(ggplot2)
>> ggplot(dd,aes(x=drugclass,y=plant,colour=fitvalue,size=fitvalue))+
>>  geom_point()
>>
>>  By the way, I think you could represent your data much more
>> clearly this way: the "Cleveland hierarchy" says that it's easier
>> to assess quantitative values plotted along a common scale than via
>> size or colour ...
>>
>> ggplot(dd,aes(x=drugclass,y=fitvalue,colour=plant))+
>>  geom_point()+geom_line(aes(group=plant))
>>
>>
>>
>> > The size of the bubbles will be related to the fitvalues.
>> >
>> >
>> >
>> > On 14 April 2011 17:57, Ben Bolker > > <mailto:bbol...@gmail.com>> wrote:
>> >
>> > Jurgens de Bruin  gmail.com <http://gmail.com>>
>> writes:
>> >
>> > >
>> > > Hi,
>> > >
>> > > I do not have much R experience just the basics, so please excuse
>> > > any obvious questions.
>> > >
>> > > I would like to create bubble plot that have Categorical data on
>> > the x and y
>> > > axis and then the diameter if the bubble the value related to x
>> and y.
>> > >  Attached to the email is a pic of what I would like to do.
>> > >
>> >
>> >  A reproducible example would be great.
>> >
>> > something along the lines of
>> >
>> > library(ggplot2)
>> >
>> ggplot(mydata,aes(x=drugclass,y=plant,colour=fitvalue,size=?))+geom_point()
>> >
>> >  it's not clear from your description what determines the size.
>> >  From a labeling point of view, switching x and y might be useful.
>> >
>> > __
>> > R-help@r-project.org <mailto: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.
>> >
>> >
>> >
>> >
>> > --
>> > Regards/Groete/Mit freundlichen Grüßen/recuerdos/meilleures salutations/
>> > distinti saluti/siong/duì yú/привет
>> >
>> > Jurgens de Bruin
>>
>> __
>>
>> 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.
>>
>
>


-- 
Regards/Groete/Mit freundlichen Grüßen/recuerdos/meilleures salutations/
distinti saluti/siong/duì yú/привет

Jurgens de Bruin

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


[R] Type of Graph to use

2011-10-10 Thread Jurgens de Bruin
Hi,

Please advice on what type of graph can be used to display the following
data set.

I have the following:

NameClass
a Class 1
a Class4
b Class2
b Class1
d Class3
d Class5
e Class4
e Class2

So each entry in name can belong to more than one class. I want to represent
the data as to see where overlaps occur that is which names are in the same
Class Name and also which names are unique to a Class. I tough a Venn
Diagram would work but this can only present numerical values for each
Class, I would like each name to be presented by a dot or *.

Any suggestions and how to would be appreciated.

-- 
Regards/Groete/Mit freundlichen Grüßen/recuerdos/meilleures salutations/
distinti saluti/siong/duì yú/привет

Jurgens de Bruin

[[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] Type of Graph to use

2011-10-10 Thread Jurgens de Bruin
Jim, This should work, would it be possible to plot *  and not larg rec.

On 10 October 2011 14:12, jim holtman  wrote:

> See if this gives you the presentation you want:
>
> x <- read.table(textConnection("NameClass
> a Class1
> a Class4
> b Class2
> b Class1
> d Class3
> d Class5
> e Class4
> e Class2"), header = TRUE)
> closeAllConnections()
> # add columns of numeric values of factors
> x$name <- as.integer(x$Name)
> x$class <- as.integer(x$Class)
> # create plot area
> plot(0
>, type = 'n'
>, xaxt = 'n'
>, yaxt = 'n'
>, xlab = ''
>, ylab = ''
>, xlim = c(0, max(x$class))
>, ylim = c(0, max(x$name))
>)
> # now plot the rectangles
> rect(
>  xleft = x$class - 1
>, ybottom = x$name - 1
>, xright = x$class
>, ytop = x$name
>, col = x$name
>)
> # add the labels
> axis(1
>, at = seq(0.5, by = 1, length = length(levels(x$Class)))
>, labels = levels(x$Class)
>)
> axis(2
>, at = seq(0.5, by = 1, length = length(levels(x$Name)))
>, labels = levels(x$Name)
>)
>
>
>
> On Mon, Oct 10, 2011 at 6:49 AM, Jurgens de Bruin 
> wrote:
> > Hi,
> >
> > Please advice on what type of graph can be used to display the following
> > data set.
> >
> > I have the following:
> >
> > NameClass
> > a Class 1
> > a Class4
> > b Class2
> > b Class1
> > d Class3
> > d Class5
> > e Class4
> > e Class2
> >
> > So each entry in name can belong to more than one class. I want to
> represent
> > the data as to see where overlaps occur that is which names are in the
> same
> > Class Name and also which names are unique to a Class. I tough a Venn
> > Diagram would work but this can only present numerical values for each
> > Class, I would like each name to be presented by a dot or *.
> >
> > Any suggestions and how to would be appreciated.
> >
> > --
> > Regards/Groete/Mit freundlichen Grüßen/recuerdos/meilleures salutations/
> > distinti saluti/siong/duì yú/привет
> >
> > Jurgens de Bruin
> >
> >[[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.
> >
> >
>
>
>
> --
> Jim Holtman
> Data Munger Guru
>
> What is the problem that you are trying to solve?
>



-- 
Regards/Groete/Mit freundlichen Grüßen/recuerdos/meilleures salutations/
distinti saluti/siong/duì yú/привет

Jurgens de Bruin

[[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] Type of Graph to use

2011-10-10 Thread Jurgens de Bruin
Thanks for all the help,

Their would it be possible to use a Venn Diagram for this application?

On 10 October 2011 14:49, Gabor Grothendieck wrote:

> On Mon, Oct 10, 2011 at 6:49 AM, Jurgens de Bruin 
> wrote:
> > Hi,
> >
> > Please advice on what type of graph can be used to display the following
> > data set.
> >
> > I have the following:
> >
> > NameClass
> > a Class 1
> > a Class4
> > b Class2
> > b Class1
> > d Class3
> > d Class5
> > e Class4
> > e Class2
> >
> > So each entry in name can belong to more than one class. I want to
> represent
> > the data as to see where overlaps occur that is which names are in the
> same
> > Class Name and also which names are unique to a Class. I tough a Venn
> > Diagram would work but this can only present numerical values for each
> > Class, I would like each name to be presented by a dot or *.
> >
>
> Assuming DF is the indicated data.frame:
>
> library(gplots)
> with(DF, balloonplot(Name, Class, rep(1, nrow(DF)), label = FALSE))
>
>
> --
> Statistics & Software Consulting
> GKX Group, GKX Associates Inc.
> tel: 1-877-GKX-GROUP
> email: ggrothendieck at gmail.com
>



-- 
Regards/Groete/Mit freundlichen Grüßen/recuerdos/meilleures salutations/
distinti saluti/siong/duì yú/привет

Jurgens de Bruin

[[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] Type of Graph to use

2011-10-10 Thread Jurgens de Bruin
Please ignore the venn digram as this will be to complex to read when more
than 3 categories are present

On 10 October 2011 15:36, Jurgens de Bruin  wrote:

> Thanks for all the help,
>
> Their would it be possible to use a Venn Diagram for this application?
>
>
> On 10 October 2011 14:49, Gabor Grothendieck wrote:
>
>> On Mon, Oct 10, 2011 at 6:49 AM, Jurgens de Bruin 
>> wrote:
>> > Hi,
>> >
>> > Please advice on what type of graph can be used to display the following
>> > data set.
>> >
>> > I have the following:
>> >
>> > NameClass
>> > a Class 1
>> > a Class4
>> > b Class2
>> > b Class1
>> > d Class3
>> > d Class5
>> > e Class4
>> > e Class2
>> >
>> > So each entry in name can belong to more than one class. I want to
>> represent
>> > the data as to see where overlaps occur that is which names are in the
>> same
>> > Class Name and also which names are unique to a Class. I tough a Venn
>> > Diagram would work but this can only present numerical values for each
>> > Class, I would like each name to be presented by a dot or *.
>> >
>>
>> Assuming DF is the indicated data.frame:
>>
>> library(gplots)
>> with(DF, balloonplot(Name, Class, rep(1, nrow(DF)), label = FALSE))
>>
>>
>> --
>> Statistics & Software Consulting
>> GKX Group, GKX Associates Inc.
>> tel: 1-877-GKX-GROUP
>> email: ggrothendieck at gmail.com
>>
>
>
>
> --
> Regards/Groete/Mit freundlichen Grüßen/recuerdos/meilleures salutations/
> distinti saluti/siong/duì yú/привет
>
> Jurgens de Bruin
>



-- 
Regards/Groete/Mit freundlichen Grüßen/recuerdos/meilleures salutations/
distinti saluti/siong/duì yú/привет

Jurgens de Bruin

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


[R] rpy2 pie chart

2011-10-17 Thread Jurgens de Bruin
I am trying to create a pie chart using rpy2 of the following data

Pathway  Occurrences
A   10%
B50%
C20%
E10%

filename = './testing.png'
grdevices = importr('grDevices')
rdevices.png(file=filename, width=1200, height=800)
dataf = Robjects.DataFrame({'pathways':Robjects.StrVector(Pathways),
occurrences' :
Robjects.FloatVector(Occurrences)
})
pie = ggplot2.ggplot(dataf)+ \
ggplot2.aes_string(x='',fill='pathways',weight="amounts")+\
ggplot2.geom_bar(width=1)+\
ggplot2.coord_polar(theta="y")
pie.plot()
grdevices.dev_off()

but this is not producing the pie chart needed where is the problem?

How to I rename the x and y lables?

-- 
Regards/Groete/Mit freundlichen Grüßen/recuerdos/meilleures salutations/
distinti saluti/siong/duì yú/привет

Jurgens de Bruin

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


[R] Legend on Pie Chart

2011-10-24 Thread Jurgens de Bruin
I would like to add a legend to my Pie chart but I don't seem to get this
working:

Below is my code, this is done on Rpy2.

grdevices = importr('grDevices')
grdevices.png(file=FileNameLocation, width=1400, height=1000)
Robjects.r.par(mar=[1, 0, 2, 12], cex=1.0)
Robjects.r.pie(Robjects.IntVector(values), labels=names,
col=Robjects.r.rainbow(colors))
Robjects.r.title("Therapeutic Influence of analysed
phytochemcials/plants")
Robjects.r.legend(Robjects.StrVector(names),"NULL",names)
grdevices.dev_off()

-- 
Regards/Groete/Mit freundlichen Grüßen/recuerdos/meilleures salutations/
distinti saluti/siong/duì yú/привет

Jurgens de Bruin

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


[R] Position of Chart in Windows

2011-10-24 Thread Jurgens de Bruin
Hi,

IS is possible to align a chart to the left of the plot area as to make
space for a legend?

-- 
Regards/Groete/Mit freundlichen Grüßen/recuerdos/meilleures salutations/
distinti saluti/siong/duì yú/привет

Jurgens de Bruin

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