R install package tabplot - r

When I install R package, tabplot, below message has come.
My R version has updated 4.0.4 because 4.0.2 had same error.
error message is below)
Warning in install.packages :
package ‘tabplot’ is not available for this version of R
A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
Could you pls share how to resolve this issue?

Let's go meta for a moment:
What are you trying to do? Do you have a particular function in that archived package that you are hoping to apply to your dataset? ( which would imply that we needed to know which function. ... and a bunch of other questions.)
Or is this an effort to follow a blog or tutorial from the Web? (Again which one?)
I see this when I execute:
> install.packages("tabplot")
Installing package into ‘/home/david/R/x86_64-pc-linux-gnu-library/3.5.1’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘tabplot’ is not available (for R version 3.6.3)
So at this point my guess is that the tabplot maintainer has not keep pace with the evolution of R. Because ... packages that depend on the syntax or the behavior of core R functions or the CRAN rules that might change over time depending on the considered decisions of the R Core and CRAN. That's just the way it is. There's a further sort of language/system evolution that Hadley spawned.(ggplot and magrittr/ddplyr/rlang). (Arguably the S4 tributary is in the same category. The last CRAN-accepted version was downloadable from: <search-for exact URL> at 'an URL to be named later"' produces "Archived on 2020-02-19 as check problems were not corrected despite reminders." So that's pretty recent. Perhaps we can just download a copy of the most recent "tabplot-xx.xx.xx.xx.tar.gz" file from the CRAN archive and install from local source. (Note: need to use repo=NULL in the install.packages call.)
Well, that's not working yet because of an unmet dependency on an object named clone from package:ff.
install.packages("~/Downloads/tabplot/", repos =NULL)
#--------------
Installing package into ‘/home/david/R/x86_64-pc-linux-gnu-library/3.5.1’
(as ‘lib’ is unspecified)
* installing *source* package ‘tabplot’ ...
** package ‘tabplot’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** demo
** inst
** byte-compile and prepare package for lazy loading
Error: object ‘clone’ is not exported by 'namespace:ff'
Execution halted
ERROR: lazy loading failed for package ‘tabplot’
* removing ‘/home/david/R/x86_64-pc-linux-gnu-library/3.5.1/tabplot’
So perhaps you can live with some drop-in R code from the expanded source on the CRAN Archive?
EDIT: So I tried figuring out how to handle that sort of error and finally decided to try changing the NAMESPACE file. It's a text file that names various functions and where the program should find them. The two lines I needed to change were the ones importing ff:::clone and ff:::is.factor.ff so change them to
importFrom(bit, clone) # the bit package has an exported version
importFrom(ff, is.factor) # removed the `.ff` from its name
And now I get:
install.packages("~/Downloads/tabplot/", repos =NULL)
Installing package into ‘/home/david/R/x86_64-pc-linux-gnu-library/3.5.1’
(as ‘lib’ is unspecified)
* installing *source* package ‘tabplot’ ...
file ‘NAMESPACE’ has the wrong MD5 checksum
** using staged installation
** R
** demo
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (tabplot)
The warning message is because I edited the NAMESPACE file but didn't do a full rebuild. Also note that you will not need the Rtools on a Windoze machine or the XCode and CLT on a Mac because there is no compiled code in this package.
It does appear that most of my efforts are paralleling the changes being made to the github version. See https://github.com/mtennekes/tabplot/issues/21 where the is.factor.ff issue was addressed 2 days ago. The author/maintainer says the package will be resubmitted to CRAN.
Despite claims that resubmission will occur. there does not seem to be any progress on that front. https://cran-archive.r-project.org/web/checks/2020/2020-02-19_check_results_tabplot.html However the github page suggests an installation via devtools and that succeeds for version 1.4.1 on an Ubuntu machine, despite the reports of errors in the earlier version that had been submitted to CRAN.

Related

How can I install knitr in Rhel8

Seeing below error while trying to install knitr_1.2.tar.gz This is on RHEL 8 and R version 3.4.3. Installing a old version of the package to satisfy user requirement.
R CMD INSTALL knitr_1.2.tar.gz
* installing to library ‘/opt/R/3.4.3/lib/R/library’
* installing *source* package ‘knitr’ ...
** package ‘knitr’ successfully unpacked and MD5 sums checked
** R
** demo
** inst
** preparing package for lazy loading
Error : object ‘tidy.source’ is not exported by 'namespace:formatR'
ERROR: lazy loading failed for package ‘knitr’
* removing ‘/opt/R/3.4.3/lib/R/library/knitr’
knitr 1.2 was released in 2013, and personally I strongly discourage your user from using such an old version. I'd like to know why they have to use it before trying to install it. If they must use it, this version of knitr requires formatR::tidy.source to be available, which in turn requires a very old version of formatR (before v1.0), because this function has been deprecated in formatR v1.0 and removed in v1.4. You may try to install formatR v0.10 before installing knitr v1.2. Again, strongly not recommended.

Is coefplot2 still supported for current version of R version 3.6.1 (2019-07-05) -- "Action of the Toes"

I use coefplot2 to plot regression estimates for ecological data. I have a new computer so just setting up. All other packages and code working for new set-up. But dearly love to keep using coefplot2 but need assistance.
I have tried to install coefplot2 using R forge and bolker source sites as recommended in several posts here and on other sites as follows, with no luck.
install.packages("coefplot2", repos="http://www.math.mcmaster.ca/bolker/R", type="source")
install.packages("coefplot2",repos="http://r-forge.r-project.org")
> install.packages("coefplot2", repos="http://www.math.mcmaster.ca/bolker/R", type="source")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘\\staff.ad.griffith.edu.au/ud/fr/s2903680/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'http://www.math.mcmaster.ca/bolker/R/src/contrib/coefplot2_0.1.3.2.tar.gz'
Content type 'application/x-gzip' length 1357869 bytes (1.3 MB)
downloaded 1.3 MB
'\\staff.ad.griffith.edu.au\ud\fr\s2903680\Desktop\Research\data_analysis_pumice\havre'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
* installing *source* package 'coefplot2' ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error in findpack(package, lib.loc) :
there is no package called 'coefplot2'
Calls: <Anonymous> -> findpack
Execution halted
ERROR: lazy loading failed for package 'coefplot2'
* removing '\\staff.ad.griffith.edu.au/ud/fr/s2903680/Documents/R/win-library/3.6/coefplot2'
Warning in install.packages :
installation of package ‘coefplot2’ had non-zero exit status
Have installed previous dependencies eg installation asked for 'reshape' to be installed. I wonder do I need to install 'rtools'. Seems silly as I am not a developer - but if it works I'll do it.
(Not really an answer but too long for a comment)
For me, both install-with-source-from-repo:
install.packages("coefplot2",
repos="http://www.math.mcmaster.ca/bolker/R",
type="source")
and install-from-github:
remotes::install_github("palday/coefplot2",
subdir = "pkg")
work (the latter is just a copy/mirror of an R-forge repo) - the latter is a little more up to date.
My guess is that the problem is with the network drive/UNC path: there are other SO questions here and here that suggest this could be a problem.
Can you try install.packages() with lib='some_local_directory' (and then library("coefplot2",lib.loc='some_local_directory') ?
The last part of this comment is that I've transitioned from coefplot2 to broom (for coefficient tables) + ggplot2/dotwhisker - it's a more modular system that's more flexible and handles a broader range of model types. (Assuming you're OK with ggplot2 solutions.)

hisafer installation - how do I solve hard-coded installation path?

I am installing the hisafer package (for biophysical modeling) following instructions from author(s) lead by Kevin Wolz:
install.packages("devtools")
devtools::install_github("kevinwolz/hisafer")
here I got the answer:
...
write_param_file html
write_weather html
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
ERROR: hard-coded installation path: please report to the package maintainer and use '--no-staged-install'
* removing 'C:/Users/houska/Documents/R/R-3.6.0/library/hisafer'
Error in i.p(...) :
(converted from warning) installation of package ‘C:/Users/houska/AppData/Local/Temp/RtmpI5hUAl/file32dc572b4098/hisafer_1.4.14.tar.gz’ had non-zero exit status
the following commands do not work, then:
library(hisafer)
vignette("hisafer-vignette")
What should I do to solve this problem?
This is related to the staged installation of packages introduced with R 3.6.0. You can disable it by passing the --no-staged-install option to R CMD INSTALL (as suggested by the error message):
devtools::install_github("kevinwolz/hisafer", INSTALL_opts="--no-staged-install")

Error in rbind(info, getNamespaceInfo(env, "S3methods")) when installing factoextra

I'm trying to install the "factoextra" package using a local source tar ball on Windows. I can install other packages in the same way with no problem. However, when installing "factoextra", I get an error relating to S3methods.
I have tried using local windows binaries, installing the latest Rtools and made sure I have all the dependencies installed. I have also tried to use archived versions of the package.
install.packages('D:\\R_Packages\\Packages\\factoextra_1.0.5.tar.gz', repos = NULL, type="source")
* installing *source* package 'factoextra' ...
** package 'factoextra' successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** byte-compile and prepare package for lazy loading
Error in rbind(info, getNamespaceInfo(env, "S3methods")) :
number of columns of matrices must match (see arg 2)
ERROR: lazy loading failed for package 'factoextra'
* removing 'D:/R-3.5.2/library/factoextra'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘D:/R_Packages/Packages/factoextra_1.0.5.tar.gz’ had non-zero exit status
I really just need this package to install.
I found this thread: http://r.789695.n4.nabble.com/Error-in-rbind-info-getNamespaceInfo-env-quot-S3methods-quot-td4755490.html, which leads me to how I solved a similar issue on my machine.
I found that a broken version of the package was installed on my system and had to be removed manually before I could install a clean version.
Find if and where factoextra is installed (it might be on your system, just outdated or broken):
find.package("factoextra")
If it's there already (just broken), you can try to remove it with:
remove.packages("factoextra")
If remove.packages() fails even though find.packages() says the package is there, use the path returned by find.packages() to use your OS' file system to find and delete the package - just be careful only to delete stuff you know is broken.
Once the old, broken package is removed, use install.packages("factoextra") and it should work.
I had several packages that were broken in this way. If that's the case for you, you can identify which packages to remove and install this way by using something like:
allPackages <- installed.packages()[, 1]
findBrokenPackages <- function(packages) {
for (p in packages) {
tryCatch(ncol(asNamespace(p)$.__NAMESPACE__.$S3methods),
error = function(e) print(c(p, e)))
}
}
findBrokenPackages(allPackages)
This will print out any packages that have the same issue. I would suggest removing all broken packages before trying to use install.packages() again.

Installing xml2 in R in Fedora 27

I'm having trouble installing xml2 in RStudio, running Fedora 27. On running install.packages('xml2'), I get the following error:
installing to /home/ryi/R/x86_64-redhat-linux-gnu-library/3.4/xml2/libs
** R
** inst
** preparing package for lazy loading
** help
Error : /tmp/Rtmp2sKZQZ/R.INSTALL689b37bd918d/xml2/man/read_xml.Rd:47: unable to load shared object '/home/ryi/R/x86_64-redhat-linux-gnu-library/3.4/xml2/libs/xml2.so':
libicui18n.so.58: cannot open shared object file: No such file or directory
ERROR: installing Rd objects failed for package ‘xml2’
* removing ‘/home/ryi/R/x86_64-redhat-linux-gnu-library/3.4/xml2’
Warning in install.packages :
installation of package ‘xml2’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpPs5Gzi/downloaded_packages’
I noticed in my /usr/lib64/, I have libicui18n.so.57 only, so I tried copying a libicui18n.so.58 there, and I got the following error:
installing to /home/ryi/R/x86_64-redhat-linux-gnu-library/3.4/xml2/libs
** R
** inst
** preparing package for lazy loading
** help
Error : /tmp/Rtmp908Ecf/R.INSTALL653812e0e41f/xml2/man/read_xml.Rd:47: unable to load shared object '/home/ryi/R/x86_64-redhat-linux-gnu-library/3.4/xml2/libs/xml2.so':
libicuuc.so.58: cannot open shared object file: No such file or directory
ERROR: installing Rd objects failed for package ‘xml2’
* removing ‘/home/ryi/R/x86_64-redhat-linux-gnu-library/3.4/xml2’
Warning in install.packages :
installation of package ‘xml2’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpPs5Gzi/downloaded_packages’
And I noticed the same problem -- I have version .57, not version .58 of this library as well. Before I repeat this over and over, is this in fact a shared library problem? Or, is there a way to fix this all at once?
I have xml2 installed (libxml2-devel-2.9.5-2.fc27.x86_64) already.
Since no one answered this yet and I've found a hacky solution, I thought I'd give an update on what worked.
It appears that my issue was that, even upon installing libxml2-devel, the version of the libraries I had in /usr/lib64 were not the same version required by RStudio's xml2 package. For example, regarding the particular package being mentioned in my question above, libicuuc.so.58, only libicuuc.so.57 could be found in /usr/lib64.
Running locate libicuuc.so.58, I found that anaconda3 has the correct versions of the libraries, so I got around the above problem temporarily by simply adding ~/anaconda3/lib to $LD_LIBRARY_PATH, roughly following instructions here.
This is a bit hacky, but led to successful installation.
Edit (IMPORTANT): Adding ~/anaconda3/lib to LD_LIBRARY_PATH in .bashrc caused a login loop, presumably because Fedora was trying to use the wrong libraries. To fix this, I added the lines:
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/ryi/anaconda3/lib/
export LD_LIBRARY_PATH
to R_HOME/etc/ldpaths.
I have solved this problem by install the ICU4C by source:
downloading ICU4C 58.2 from: ICU-Project
compiled
added the library location to $LD_LIBRARY_PATH,
the install will be work.

Resources