[R-sig-Debian] Package selectr: issue with the apt-get version, but not with the one installed from R?

Michael Rutter marutter at gmail.com
Thu Mar 23 00:48:58 CET 2017



On 03/22/2017 02:54 PM, Matthieu S wrote:
> Hi
>
> I am facing an issue with the package selectr, where I get an error trying
> to run an example code: css_to_xpath(".testclass"), gives could not find
> function "xpath_class"
>
> The issue arises however only with the package installed with apt-get, not
> when installed from within R. I got a similar issue with maptools, where I
> was not able to use data(wrld_map), and switching to the version "from
> within R" version did solve the issue in the same way.
>
> Note that I posted the issue some time ago on stack-overflow:
> http://stackoverflow.com/questions/40874011/r-rvest-could-not-find-function-xpath-element/42960170#42960170
> but now that I pinned the issue down to the apt-get versus R, I hope I can
> ask on this list?  For the apt-get, I have cran sources added, as well as
> Michael's ppa http://ppa.launchpad.net/marutter/rrutter/ubuntu and
> http://ppa.launchpad.net/marutter/c2d4u/ubuntu

Matthieu,

I am able to recreate this, but I am not sure what the solution is.  I 
am going to try a couple of things and let you know.  The code for 
"xpath_class" is there, it is just not finding it.

Thanks for pointing this out,
Michael

>
> Here is a sample code showing my issue:
>
>> pkg <- installed.packages()
>> subset(as.data.frame(pkg), Package=="selectr", c("Package", "LibPath"))
>           Package                                         LibPath
> selectr   selectr /home/matifou/R/x86_64-pc-linux-gnu-library/3.3
> selectr.1 selectr                         /usr/lib/R/site-library
>> library(selectr,
> lib.loc="/home/matifou/R/x86_64-pc-linux-gnu-library/3.3")
>> css_to_xpath(".testclass")
> [1] "descendant-or-self::*[@class and contains(concat(' ',
> normalize-space(@class), ' '), ' testclass ')]"
>> detach("package:selectr", unload=TRUE)
>> library(selectr, lib.loc="/usr/lib/R/site-library")
>> css_to_xpath(".testclass")
> Error in do.call(method, list(parsed_selector)) :
>   could not find function "xpath_class"
>
> Thanks!!
>
> Matthieu
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-SIG-Debian mailing list
> R-SIG-Debian at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-debian
>



More information about the R-SIG-Debian mailing list