Data Presentation Flashcards

1
Q

want to include variables from an R session in mathematical expressions, and substitute in their actual values

A

substitute()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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().

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

a demo that shows you everything about plotting math in R (it was written by the R Core Team

A

demo(plotmath)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Want to write mathematical symbols and expressions in R graphics?

A

expression()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

library(RColorBrewer)
par(mar = c(0, 4, 0, 0))
display.brewer.all()

A

the color palettes in RColorBrewer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

brewer.pal(8, “Set2”)

A

generate 8 colors from the Set2 palette

How well did you know this?
1
Not at all
2
3
4
5
Perfectly