I am trying to read a HTML table using the XML command readHTMLTable. It is information about options in the Eurex page. When i run the code:
info<-readHTMLTable("http://www.eurexchange.com/action/exchange-en/155392-31606/31608/quotesSingleViewOption.do?callPut=Call&maturityDate=201312",which=1)
I get this error message:
Error: failed to load external entity "http://www.eurexchange.com/action/exchange-en/155392-31606/31608/quotesSingleViewOption.do?callPut=Call&maturityDate=201312"
I have the correct packages installed and the last r version.
Does anybody know what could be the problem?
Thank you
Use function GET of package httr to retrieve html content:
info<-readHTMLTable(rawToChar(GET("http://www.eurexchange.com/action/exchange-en/155392-31606/31608/quotesSingleViewOption.do?callPut=Call&maturityDate=201312")$content),which=1)
Related
I keep getting the following error on app.powerbi.com:
"Error in pivot_wider(data, names_from=names,values_from=values): could not find function "pivot_wider""
I load the 'tidyr' package as a required library.
I get the same error when using "spread" instead of pivot_wider.
When I specify the function using:
tidyr::pivot_wider(data, names_from=names, values_from=values)
I get a different error:
"Error in loadNamespace(name): there is no package called 'tidyr'".
PowerBI Desktop everything works perfectly fine. It's only on the published PowerBI report that I get the error.
What can I do to resolve this issue?
Alternative library / function to 'pivot_wider' or 'spread'?
I was able to verify using print statements that the report on powerbi.com was not able to access the r packages that were installed.
I was using a .libPaths()[3] to point to the location where my libraries were installed, but this didn't work in powerbi.com.
I ended up re-installing R to a location where I could install packages to, since admin rights are necessary to write to the C:/users/program files location.
I have installed h2o package(in R from RStudio console). Post h2o.init() I am trying to use the built in function upload_model()/upload_mojo() but I am getting following error.
h2o.upload_mojo()
Error in h2o.upload_mojo() : could not find function "h2o.upload_mojo"
h2o.upload_model()
Error in h2o.upload_model() : could not find function "h2o.upload_model"
I found work around to resolve this issue. Please find below the steps I followed:
Remove the package using: remove.packages("h2o")
Quit the current session and launch the new one.
Move out lock file for h2o from path where package was installed mostly under R with file name like - 00LOCK-h2o
Install new/latest version of package via RStudio console using install.packages()
It should now resolve this issue.
I have the following script, which works perfectly fine, when I run it on my local PC:
library(RAdwords)
autX <- doAuth()
data <- getData(clientCustomerId='xxx-xxx-xxxx',
google_auth=autx
)
However, when I try to run the very same script on my Unix-Server, then I get this error message:
Error in rjson::fromJSON(RCurl::postForm("https://accounts.google.com/o/oauth2/token", :
STRING_ELT() can only be applied to a 'character vector', not a 'raw'
Question: What could be the reason and how can I fix it?
By the way:
I did copy the files .gitgnore and .google.auth.RData from the folder on my local PC, where I already did this authentification, to the directory on my server.
If I just type doAuth() alone I do not get an error message.
Issue:
getData()calls the function refreshToken() that updates the authentication token of the Google AdWords API. Within the function refreshToken the RCurl command returns a raw data file instead of a character file format. rjson::fromJSON returns an error that is solved with the addition of rawToChar().
Solution:
I created a patch of the function and updated the Github development version of RAdwords.
You can install the new package version with:
require(devtools)
install_github('jburkhardt/RAdwords')
I am trying to use easyPubMed package in R to download content from PubMed in txt format. I am trying to run the following example:
dami_on_pubmed <- get_pubmed_ids("Damiano Fantini[AU]")
However, at this point I get the following error:
Error in url(myPubmedURL, open = "rb") : https:// URLs are not supported
How to solve this problem?
Thanks
I have been using roxygen2::roxygenise quite successfully with my package to build exported and imported functions. However, I recently ran into this error which I am unable to resolve:
> roxygen2::roxygenise()
First time using roxygen2. Upgrading automatically...
Error: File file does not exist
This is not the first time I have used roxygen2 with this package. In addition, I am not quite sure what "File file does not exist" means. Has anyone else seen this and been able to resolve it?
I think you have to set the working directory of R to be the package folder
I got the same error when using:
roxygen2::roxygenise("mypackage")
But, I didn't get the error when I instead used:
library(roxygen2)
roxygenise()
I know this is no explanation and I can't comment upon whether this works beyond my case.