Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
EXP1STATS
empid=c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50) empid age=c(30,31,30,31,33,31,30,41,35,31,30,31,39,31,34,32,29,31,30,31,30,31,30,34,40,41,40,43,30,31,30,31,34,34,34,34,30,31,31,31,50,35,50,51,50,41,43,41,44,49) age sex=c(0,0,0,1,0,1,0,1,1,1,1,1,0,1,0,1,0,1,0,1,1,1,1,1,0,1,0,0,0,0,0,0,0,1,1,1,0,1,0,1,0,1,0,0,0,1,0,1,0,0) sex status=c(1,2,2,2,1,1,1,1,1,1,2,2,1,2,1,2,2,2,1,1,1,1,2,2,1,2,1,2,1,2,1,2,2,2,2,2,1,1,1,2,1,2,1,2,1,2,1,2,2,1) status subject=c(2,3,2,2,3,4,3,3,4,2,3,4,4,4,4,2,3,2,2,3,4,2,3,4,2,3,2,2,2,4,2,3,4,4,3,4,2,3,4,2,3,3,3,3,4,2,3,4,4,2) subject empinfo=data.frame(empid,age,sex,status,subject) empinfo$sex=factor(empinfo$sex,label=c("Male","Female")) empinfo$status=factor(empinfo$status,label=c("Staff","Faculty")) empinfo$subject=factor(empinfo$subject,label=c("Maths","Physics","Biology")) empinfo summary(empinfo) summary(empinfo$sex) summary(empinfo$status) summary(empinfo$subject) result.mean=mean(age) print('Mean Age =') print(result.mean) table1=table(empinfo$sex) table2=table(empinfo$status) table3=table(empinfo$subject) pie(table1) table4=table(empinfo$status,empinfo$subject) barplot(table4,beside=T,xlim=c(1,20)) legend("topright",legend=rownames(table4),fill=c('black','lightgrey'),bty="n") table5=table(empinfo$sex,empinfo$status) barplot(table5,beside=T,ylim=c(0,25)) legend("topright",legend=rownames(table5),fill=c(fill=c('black','lightgrey'),bty="n")) table6=table(empinfo$sex,empinfo$subject) barplot(table6,beside=T,ylim=c(0,15)) legend("topright",legend=rownames(table6),fill=c(fill=c('black','lightgrey'),bty="n"))
run
|
edit
|
history
|
help
0
marian
10-08-2020Exe
21-09-2020IntpoliLag
Pie Chart in R
Paired t-test [Shear Strength of Girder]
Análise de variância ANOVA para experimento em DIC - Exemplo 01
Polynomial Regression with Interaction
Dbinom
lab1
Cos R Example