Data Presentation Flashcards
1
Q
want to include variables from an R session in mathematical expressions, and substitute in their actual values
A
substitute()
2
Q
hist(rnorm(100, x_mean, x_sd), main = substitute( paste(X[i], " ~ N(", mu, "=", m, ", ", sigma^2, "=", s2, ")"), list(m = x_mean, s2 = x_sd^2) ) )
A
if we want to include variables from an R session in mathematical expressions, and substitute in their actual values, we can use substitute().
3
Q
a demo that shows you everything about plotting math in R (it was written by the R Core Team
A
demo(plotmath)
4
Q
Want to write mathematical symbols and expressions in R graphics?
A
expression()
5
Q
library(RColorBrewer)
par(mar = c(0, 4, 0, 0))
display.brewer.all()
A
the color palettes in RColorBrewer
6
Q
brewer.pal(8, “Set2”)
A
generate 8 colors from the Set2 palette