Message-ID: <48cb4eed-7c20-c02d-de34-418db4fe040c@sapo.pt>
Date: 2021-03-10T23:01:20Z
From: Rui Barradas
Subject: Help please
In-Reply-To: <CAGFDBznpBL9QsPVrR=i1+rawAN10dsAC0KoYq+z_wfc22ubokg@mail.gmail.com>
Hello,
Please read the posting guide at the end of this and every R-Help mail.
You should post the output of
dput(data)
or, if the data set 'data' is too big, the output of
dput(head(data, 20))
for us to be able to help you.
Rui Barradas
?s 18:29 de 10/03/21, Areti Panopoulou escreveu:
> Hello,
>
> I am trying to make a stacked barplot with different behaviours
> ("inactive", "active", "foraging" etc) on different substrates ("tree",
> "ground" etc). I have found this function:
>
> # Stacked Bar Plot with Colors and Legend
> counts <- table(mtcars$vs, mtcars$gear)
> barplot(counts, main="Car Distribution by Gears and VS",
> xlab="Number of Gears", col=c("darkblue","red"),
> legend = rownames(counts))
>
> But don't know how to apply it. Can anybody help me apply the function to
> work with my variables ( I can send more information if necessary, or make
> any clarifications).
>
> This is a great help, thanks a lot.
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>