Hello,
A ggplot graph follows almost exactly my previous code. The *only*
difference is in facet_wrap(). See below.
library(ggplot2)
idv <- grep("part", names(DB)[-(3:4)], ignore.case = TRUE, value = TRUE)
dblong <- reshape2::melt(DB[-(3:4)], id.vars = idv)
dblong <- reshape2::melt(dblong, i
This is a consolation, because I cannot get it in ggplot either!
Thanks for the code!
F.
> Il giorno 5 dic 2019, alle ore 11:17, Jim Lemon ha
> scritto:
>
> Sorry it's not ggplot, I couldn't work that one out.
>
> # using the data frame structure that Rui kindl
Exactly. I was trying to remelt data in the right way, but I could not get
there yet. Can you suggest me this code?
Thanks a lot
F.
--
> Il giorno 5 dic 2019, alle ore 11:11, Jim Lemon ha
> scritto:
>
> Hi Francesca,
> Do you want something like this?
>
> Jim
Hi Francesca,
Do you want something like this?
Jim
On Thu, Dec 5, 2019 at 6:58 PM Francesca wrote:
>
> Hi, sorry for bothering again.
> I was wondering how I can reshape the data, if in your code,
> I would like to have only two panels, where in the panel with Participation
> =0, I represent de
Hi, sorry for bothering again.
I was wondering how I can reshape the data, if in your code,
I would like to have only two panels, where in the panel with Participation =0,
I represent delta11_L of participation1==0
and delta2_L of participation2==0, and in the right panel, I want
Participation=1
Hi!
It is not exactly what I wanted but more than I suspected I could get.
Thanks a lot, this is awesome!
Francesca
On Wed, 4 Dec 2019 at 14:04, Rui Barradas wrote:
> Hello,
>
> Please keep R-Help in the thread.
>
> As for the question, the following divides by facets, participation1/2
> with va
Hello,
Is it as simple as this? The code below does not separate the
participant1 and participant2, only the 'delta' variables.
idv <- grep("part", names(DB)[-(3:4)], ignore.case = TRUE, value = TRUE)
dblong <- reshape2::melt(DB[-(3:4)], id.vars = idv)
head(dblong)
ggplot(dblong, aes(x = val
Hi
here it is;. THANKS!
dput(DATASET)
structure(c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1,
1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1
Hello,
Please post the output of
dput(DB)
in a next e-mail to R-Help, like this it's difficult for us to use the
data you posted.
And yes, I bet you will need the data in long format. It is a frequent
first step to the problem of plotting two or more columns in the same
graph. To say more
9 matches
Mail list logo