Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Pie Chart in R
library(ggplot2) theme_set(theme_classic()) # Source: Frequency table df <- as.data.frame(table(mpg$class)) colnames(df) <- c("class", "freq") pie <- ggplot(df, aes(x = "", y=freq, fill = factor(class))) + geom_bar(width = 1, stat = "identity") + theme(axis.line = element_blank(), plot.title = element_text(hjust=0.5)) + labs(fill="class", x=NULL, y=NULL, title="Pie Chart of class", caption="Source: mpg") pie + coord_polar(theta = "y", start=0) # Source: Categorical variable. # mpg$class pie <- ggplot(mpg, aes(x = "", fill = factor(class))) + geom_bar(width = 1) + theme(axis.line = element_blank(), plot.title = element_text(hjust=0.5)) + labs(fill="class", x=NULL, y=NULL, title="Pie Chart of class", caption="Source: mpg") pie + coord_polar(theta = "y", start=0)
run
|
edit
|
history
|
help
0
Chev-nodes
Test of Code Wall
SampleDiscrFR.r
First R
Área sob curvas de funções: Integração numérica utilizando a regra do ponto médio.
AjusteNaoLinear11-02-21
Regressão linear
time series
Hiring Discrimination
CDF- Gaussian (trapezoids method)