While trying to modify theme settings this simple code gives the following error:
library(ggplot2)
theme_nogrid <- theme_set(theme_update(
plot.margin=unit(c(.25, .25, .25, .25), "in"),))
Error in do.call(theme, list(...)) : could not find function "unit"
R
gives me this error for any element that uses 'unit'. Any other settings that do not call 'unit' work fine. I am running R v.2.15.2 (64-bit Windows).
I extensively searched online about this problem and found nothing.
I appreciate any suggestions to the problem.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…