I'm trying to write some SPARQL queries in R using the rrdf package. However, I get this error every time I try to load the library.
我正在尝试使用rrdf包在R中编写一些SPARQL查询。但是,每次尝试加载库时都会出现此错误。
Error: package 'rrdflibs' 1.1.2 was found, but == 1.1.0 is required by 'rrdf'
Not sure why they didn't write it as >= 1.1.0
. Is what they did a good programming practice?
不知道为什么他们没有把它写成> = 1.1.0。他们做了什么好编程练习?
1 个解决方案
#1
9
Go to http://cran.r-project.org/src/contrib/Archive/rrdflibs/ to retrieve an older version. This is a source archive, so you will have to be able to build from source (typically easy on Linux, pretty easy on MacOS, and hard on Windows; you can use the http://win-builder.r-project.org/ service to build a Windows binary if necessary).
请访问http://cran.r-project.org/src/contrib/Archive/rrdflibs/以检索旧版本。这是一个源存档,因此您必须能够从源代码构建(通常在Linux上很容易,在MacOS上很容易,在Windows上很难;您可以使用http://win-builder.r-project.org / service如果需要,可以构建Windows二进制文件)。
Actually, based on a quick look at the package, I think you should be able to install in this case (even on Windows without Rtools) via
实际上,基于对软件包的快速浏览,我认为您应该能够在这种情况下安装(即使在没有Rtools的Windows上)
download.file("http://cran.r-project.org/src/contrib/Archive/rrdflibs/rrdflibs_1.1.0.tar.gz",
dest="rrfdlibs_1.1.0.tar.gz")
install.packages("rrfdlibs_1.1.0.tar.gz",repos=NULL,type="source")
because the package doesn't actually contain anything that needs to be compiled.
因为包实际上不包含任何需要编译的东西。
Don't know about programming practice, you'd have to ask the authors if they had some particular reason to do it that way. (See maintainer("rrdf")
.) Maybe they knew the versions would not be backward/forward compatible?
不了解编程实践,你必须问作者他们是否有某种特殊的理由这样做。 (参见维护者(“rrdf”)。)也许他们知道版本不会向后/向前兼容?
#1
9
Go to http://cran.r-project.org/src/contrib/Archive/rrdflibs/ to retrieve an older version. This is a source archive, so you will have to be able to build from source (typically easy on Linux, pretty easy on MacOS, and hard on Windows; you can use the http://win-builder.r-project.org/ service to build a Windows binary if necessary).
请访问http://cran.r-project.org/src/contrib/Archive/rrdflibs/以检索旧版本。这是一个源存档,因此您必须能够从源代码构建(通常在Linux上很容易,在MacOS上很容易,在Windows上很难;您可以使用http://win-builder.r-project.org / service如果需要,可以构建Windows二进制文件)。
Actually, based on a quick look at the package, I think you should be able to install in this case (even on Windows without Rtools) via
实际上,基于对软件包的快速浏览,我认为您应该能够在这种情况下安装(即使在没有Rtools的Windows上)
download.file("http://cran.r-project.org/src/contrib/Archive/rrdflibs/rrdflibs_1.1.0.tar.gz",
dest="rrfdlibs_1.1.0.tar.gz")
install.packages("rrfdlibs_1.1.0.tar.gz",repos=NULL,type="source")
because the package doesn't actually contain anything that needs to be compiled.
因为包实际上不包含任何需要编译的东西。
Don't know about programming practice, you'd have to ask the authors if they had some particular reason to do it that way. (See maintainer("rrdf")
.) Maybe they knew the versions would not be backward/forward compatible?
不了解编程实践,你必须问作者他们是否有某种特殊的理由这样做。 (参见维护者(“rrdf”)。)也许他们知道版本不会向后/向前兼容?