[R] [External] Help please
Richard M. Heiberger
rmh @end|ng |rom temp|e@edu
Thu Mar 11 01:19:20 CET 2021
> counts <- with(mtcars, table(gear, vs))
> counts
vs
gear 0 1
3 12 3
4 2 10
5 4 1
> likert(counts)
>
If this isn't enough, ask a more specific question.
________________________________________
From: R-help <r-help-bounces using r-project.org> on behalf of Richard M. Heiberger <rmh using temple.edu>
Sent: Wednesday, March 10, 2021 17:58
To: Areti Panopoulou; r-help using r-project.org
Subject: Re: [R] [External] Help please
install.packages("HH")
library(HH)
?likert
>From your description, I think your data is set up to work with likert()
________________________________________
From: R-help <r-help-bounces using r-project.org> on behalf of Areti Panopoulou <aretipanopoulou using gmail.com>
Sent: Wednesday, March 10, 2021 13:29
To: r-help using r-project.org
Subject: [External] [R] Help please
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 using 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.
______________________________________________
R-help using 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.
More information about the R-help
mailing list