done through category statistics
This commit is contained in:
parent
4ebd4f9222
commit
9cb9c68c87
Binary file not shown.
@ -55,3 +55,27 @@ nrow(school.freq)
|
|||||||
colors
|
colors
|
||||||
barplot(composition.freq, col=colors)
|
barplot(composition.freq, col=colors)
|
||||||
q()
|
q()
|
||||||
|
library(MASS)
|
||||||
|
school = painters$school
|
||||||
|
school
|
||||||
|
school = painters$School
|
||||||
|
school
|
||||||
|
school.freq = table(school)
|
||||||
|
pip(school.freq)
|
||||||
|
pie(school.freq)
|
||||||
|
colors = c("red", "yellow", "green", "violet", "orange", "blue", "pink", "cyan")
|
||||||
|
pie(school.freq, col=colors)
|
||||||
|
composition = painters$Composition
|
||||||
|
composition.freq = table(composition)
|
||||||
|
pip(composition.freq, col=colors)
|
||||||
|
pie(composition.freq, col=colors)
|
||||||
|
library(MASS)
|
||||||
|
school = painters$School
|
||||||
|
c_school = school == "C"
|
||||||
|
c_painters = painters[c_school,]
|
||||||
|
mean(c_painters$Composition)
|
||||||
|
pie(tapply(painters$Composition, painters$School, mean)
|
||||||
|
pie(tapply(painters$Composition, painters$School, mean))
|
||||||
|
barchart(tapply(painters$Composition, painters$School, mean))
|
||||||
|
barplot(tapply(painters$Composition, painters$School, mean))
|
||||||
|
q()
|
||||||
|
Loading…
Reference in New Issue
Block a user