Quantcast
Channel: Service topics
Viewing all articles
Browse latest Browse all 62558

Failed to load R script

$
0
0

I have this R script and he run succefully but when i would to load in Power BI, i get that error message:

this is my code: 

library(rvest)
> library(httr)
> sess <- html_session("http://www.atb.com.tn/", user_agent("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.39 Safari/537.36"))
> pg <- jump_to(sess, "http://www.atb.com.tn/devise")
> dat <- content(pg$response, as="parsed")
> mydata= html_table(html_nodes(dat, "table")[[2]], header=TRUE)

And that the error message:

 

 

Détails : « ADO.NET : Erreur du script R.
Le chargement a nÚcessitÚ le package : xml2
Error in as.vector(x, "list") :
cannot coerce type 'environment' to vector of type 'list'
Calls: html_table ... <Anonymous> -> lapply -> as.list -> as.list.default
ExÚcution arrÛtÚe


Viewing all articles
Browse latest Browse all 62558

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>