Editing CommunityData:Knitr
From CommunityData
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 7: | Line 7: | ||
A data frame for a summary stats table could look something like this, for instance (assuming you've loaded your data in a dataframe called d): | A data frame for a summary stats table could look something like this, for instance (assuming you've loaded your data in a dataframe called d): | ||
summary.stats <- data.frame(cbind( | summary.stats <- data.frame(cbind(c("Var 1", "Var 2", "Var 3"), | ||
c(min(d$var.1), min(d$var.2), min(d$var.3)), | c(min(d$var.1), min(d$var.2), min(d$var.3)), | ||
c(median(d$var.1), median(d$var.2), median(d$var.3)), | c(median(d$var.1), median(d$var.2), median(d$var.3)), | ||
c(max(d$var.1), max(d$var.2), max(d$quality.score)) | c(max(d$var.1), max(d$var.2), max(d$quality.score)))) | ||
Make sure to also include column names for your dataframe: | Make sure to also include column names for your dataframe: |