我正在使用R markdown,并希望将文件导出为PDF格式。但是,我收到以下错误消息:
> Error in (function (url = NULL, file = "webshot.png", vwidth = 992, > vheight = 744, : webshot.js returned failure value: -6
我同时使用了Google趋势和Worldbank数据(由library(gtrendsR)和library(WDI)生成)。 例如:
library(WDI)
GDP <- data.frame(GDP)
GDP.y <- GDP$NY.GDP.PCAP.CD
GDP.x = GDP$year
p2 <- plot_ly(GDP,
x = ~GDP.x,
y = ~GDP.y,
name = "GDP",
type = "scatter",
mode = "lines+markers")%>%
layout(title = "GDP per capita United states",
xaxis = list(title = "Year",
zeroline = FALSE),
yaxis = list(title = "Volume",
zeroline = FALSE))
p2