Skip to content

Instantly share code, notes, and snippets.

@nashutoing
Created March 17, 2019 01:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nashutoing/73c196fea9e367e83f51ca610c05ef30 to your computer and use it in GitHub Desktop.
Save nashutoing/73c196fea9e367e83f51ca610c05ef30 to your computer and use it in GitHub Desktop.
aoki_10bats added way to make table for html style and new csv file
a<- rbinom(1000,10,0.285)
打率<- a/10
hist(打率,freq=TRUE,breaks=seq(0,1,0.05),xlab = "打率", ylab = "シーズン数",
main = "10打席に立った青木選手の1000シーズン分の打率分布")
table(打率)
print(xtable(table(打率)),type = "html") #make table(打率) written by html style
write.csv(table(b),"aoki10bat.csv",quote = FALSE, sep=",") #make new table(b).csv file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment