R 无法在ggplot2中绘制带有标题的散点图

R 无法在ggplot2中绘制带有标题的散点图,r,plot,ggplot2,R,Plot,Ggplot2,试图从以下内容复制情节: 创建数据帧: library(dplyr) pingpongDF <- data_frame(quarters = c("3Q 2014", "4Q 2014", "1Q 2015", "2Q 2015", "3Q 2015", "4Q 2015", "1Q 2016"), pingpong = c(142, 230, 215, 190, 145, 153, 60), VCdeals = c(1012,

试图从以下内容复制情节:

创建数据帧:

library(dplyr)
pingpongDF <- data_frame(quarters = c("3Q 2014", "4Q 2014", "1Q 2015", "2Q 2015", "3Q 2015", 
          "4Q 2015", "1Q 2016"),
          pingpong = c(142, 230, 215, 190, 145, 153, 60),
          VCdeals = c(1012, 1015, 1001, 1100, 960, 920, 860))

library(ggplot2)
ggplot(pingpongDF, aes(x = pingpong, y = VCdeals, label = quarters)) +
    geom_point(color = "white", size = 7) +
    geom_vline(xintercept = 150, color = "white", size = 1.5) +
    geom_hline(yintercept = 1000, color = "white", size = 1.5) +
    geom_text(check_overlap = TRUE, color = "gray60", family="Roboto-Bold", vjust = 0, nudge_y = 10, nudge_x = -5) +
    annotate("text", label = "In the most\nrecent quarter\nboth measures\nwere low.", family="Roboto-Bold",
             color = "black", x = 70, y = 868, hjust = 0, size = 4) +
    labs(title = "Tech Bounce",
         subtitle = "Sales of ping-pong tables to companies at a Silicon Valley store\ncorrelate with venture-capital deals made during the same quarter",
         y = "Venture-capital deals made", 
         x = "Ping-pong tables sold",
         caption = "Sources: Billiard Wholesale (sales), Dow Jones VentureSource (deals)") +
    xlim(50, 250) + ylim(850, 1150) +
    theme_minimal(base_family = "RobotoCondensed-Regular", base_size = 14) +
    theme(plot.title=element_text(family="Roboto-Bold")) +
    theme(panel.background = element_rect(fill = "#CBDEB1")) +
    theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank()) +
    theme(plot.caption=element_text(size=9)) +
    theme(plot.caption=element_text(margin=margin(t=10)))

subtitle
plot.caption=
ggplot2
@Didzis-Elferts的开发版本中提供……真的……这意味着我已经通过github安装了ggplot2……我会尽快完成……
subtitle
plot.caption=
ggplot2
@Didzis的开发版本中提供Elferts……真的……这意味着我已经通过github安装了ggplot2……我会尽快完成。。。。
Error in (function (el, elname)  : 
"plot.caption" is not a valid theme element name.
Calls: <Anonymous> ... withVisible -> eval -> eval -> theme -> mapply ->             <Anonymous>
Execution halted
sessionInfo()
R version 3.3.0 (2016-05-03)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

locale:
[1] LC_COLLATE=English_India.1252  LC_CTYPE=English_India.1252   
[3] LC_MONETARY=English_India.1252 LC_NUMERIC=C                  
[5] LC_TIME=English_India.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] ggplot2_2.1.0

loaded via a namespace (and not attached):
[1] colorspace_1.2-6 scales_0.4.0     plyr_1.8.3       rsconnect_0.4.3 
[5] htmltools_0.3.5  tools_3.3.0      gtable_0.2.0     yaml_2.1.13     
[9] Rcpp_0.12.4      rmarkdown_0.9.6  grid_3.3.0       knitr_1.12.3    
[13] digest_0.6.9     munsell_0.4.3