org
Subject: Re: [R] Weighted violin chart
On 15/04/2021 11:07 a.m., Mahmood Naderan-Tahan wrote:
> It seems that using weight in ggplot has no effect. Also, using weight
> parameter in geom_violin results in an error.
>
>
>> mydata
> V1 V2 V3
> P1 73.6 5 R
> P2 75.2
10 10 5
Any idea to fix that?
Regards,
Mahmood
From: Jeff Newmiller
Sent: Thursday, April 15, 2021 4:13:10 PM
To: r-help@r-project.org; Mahmood Naderan-Tahan; r-help@r-project.org
Subject: Re: [R] Weighted violin chart
N
___
>>From: Jeff Newmiller
>>Sent: Thursday, April 15, 2021 4:13:10 PM
>>To: r-help@r-project.org; Mahmood Naderan-Tahan; r-help@r-project.org
>>Subject: Re: [R] Weighted violin chart
>>
>>Not strictly on topic on this list (ggplot2 is a contributed pa
Not strictly on topic on this list (ggplot2 is a contributed package) but...
ggplot(mydata, aes(x=V3, y=V1, weight=V2 )) + geom_violin(trim=FALSE)
If you want to refer to variables in the data, they have to be listed in the
mapping.
On April 15, 2021 7:01:45 AM PDT, Mahmood Naderan-Tahan
wrot
Hi again,
As a follow up, does anybody know how to fix the following error?
It seems that I can use a "weight" parameter in geom_violin, but I am able to
figure out what is the problem with the following code.
> library(ggplot2)
> mydata <- read.csv('test.csv', header=T,row.names=1)
> mydat
- Original Message -
> From: "Mahmood Naderan-Tahan"
> To: r-help@r-project.org
> Sent: Monday, 12 April, 2021 21:01:18
> Subject: [R] Weighted violin chart
> Hi,
>
> I would like to know if it is possible to plot a weighted violin chart with R.
>
Hi,
I would like to know if it is possible to plot a weighted violin chart with R.
Currently, I have
> library(ggplot2)
> mydata <- read.csv('test.csv', header=T,row.names=1)
> mydata
V1 V2 V3
P1 73.6 50 R
P2 75.2 20 R
P3 6.5 5 R
P4 41.4 10 C
P5 5.4 10 C
P6 18.8 5 C
> p <- ggplot
7 matches
Mail list logo