我正在使用 webshot 来保存 wordcloud2 创建的 html 小部件,但是每当我将 png 文件传递给 figPath 时,我都会得到一个空白图像。如果我打开 .html 文件,我可以看到 wordcloud,但是 webshot 创建的 png 是空白的。当 figPath = NULL 时它工作正常。我不明白为什么会这样。
这是我的代码:
library(wordcloud2)
library(RColorBrewer)
File <- "image.png"
library(webshot)
library(htmlwidgets)
graph <- wordcloud2(freqdf, size=clsize, color =clcolor, backgroundColor =clbgcolor,
figPath = clfigpath)
saveWidget(graph,"tmp.html",selfcontained = FALSE)
webshot("tmp.html",File, delay = 20)
Run Code Online (Sandbox Code Playgroud) 我正在尝试编写一个计划程序,它将标记列表作为输入,并将输出作为等级列表.
我到目前为止,...我不知道什么是错的我得到一个错误,对象()作为第一个参数传递给cdr不是正确的类型....
这是代码
(define (grades list1)
(cons (cond ((= (car list1) 100) 'S)
((= (car list1) 90) 'A))
(cons (grades (cdr list1)) '())))
Run Code Online (Sandbox Code Playgroud)