问题描述
这是我的代码,我在下面写了输出错误,希望得到一些关于如何解决这个问题的建议。谢谢。
library(rvest)
library(xml2)
library(dplyr)
library(purrr)
setwd(/Users/user/Desktop/Coding/Scraping)
url<-("http://www.mmadecisions.com/decisions-by-judge/A")
connection<-"mmadecisions.js"
writeLines(sprintf("var page = require('webpage').create();
page.open('%s',function(){
console.log(page.content);//page source
phantom.exit();
});",url),con=connection)
这是错误:
writeLines(sprintf("var page = require('webpage').create();
+ page.open('%s',function(){
+ console.log(page.content);//page source
+ phantom.exit();
+ });",con=connection)
Error in as.character(function (description,open = "",blocking = TRUE,:
cannot coerce type 'closure' to vector of type 'character'
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)