HELP!

201 views
Skip to first unread message

Emília Wendt

unread,
Nov 13, 2019, 3:50:24 PM11/13/19
to bioge...@googlegroups.com
HelloI am trying to instal the BioGeoBEARS in R, but It never are woking. I don't know what is the problem. I am running in Windows 7, and using R 3.6.1. The problem beginner with devtools installation. Someone know what are going on?


______________________________________________________________
> install.packages('devtools')
Installing package into ‘D:/Usuário/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
also installing the dependency ‘DT’


  There is a binary version available but the source version is later:
   binary source needs_compilation
DT    0.9   0.10             FALSE

tentando a URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/devtools_2.2.1.zip'
Content type 'application/zip' length 343132 bytes (335 KB)
downloaded 335 KB

package ‘devtools’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
C:\Users\Emilia\AppData\Local\Temp\RtmpGutEAX\downloaded_packages
installing the source package ‘DT’

tentando a URL 'https://cran.rstudio.com/src/contrib/DT_0.10.tar.gz'
Content type 'application/x-gzip' length 831499 bytes (812 KB)
downloaded 812 KB

* installing *source* package 'DT' ...
** package 'DT' successfully unpacked and MD5 sums checked
** using staged installation
Warning in file(file, if (append) "a" else "w") :
  cannot open file 'D:/Usuario/Documents/R/win-library/3.6/00LOCK-DT/00new/DT/DESCRIPTION': No such file or directory
Error in file(file, if (append) "a" else "w") :
  não é possível abrir a conexão
ERROR: installing package DESCRIPTION failed for package 'DT'
* removing 'D:/Usuário/Documents/R/win-library/3.6/DT'
Warning in install.packages :
  installation of package ‘DT’ had non-zero exit status

The downloaded source packages are in
‘C:\Users\Emilia\AppData\Local\Temp\RtmpGutEAX\downloaded_packages’
> install.packages('DT')
Installing package into ‘D:/Usuário/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)

  There is a binary version available but the source version is later:
   binary source needs_compilation
DT    0.9   0.10             FALSE

installing the source package ‘DT’

tentando a URL 'https://cran.rstudio.com/src/contrib/DT_0.10.tar.gz'
Content type 'application/x-gzip' length 831499 bytes (812 KB)
downloaded 812 KB

* installing *source* package 'DT' ...
** package 'DT' successfully unpacked and MD5 sums checked
** using staged installation
Warning in file(file, if (append) "a" else "w") :
  cannot open file 'D:/Usuario/Documents/R/win-library/3.6/00LOCK-DT/00new/DT/DESCRIPTION': No such file or directory
Error in file(file, if (append) "a" else "w") :
  não é possível abrir a conexão
ERROR: installing package DESCRIPTION failed for package 'DT'
* removing 'D:/Usuário/Documents/R/win-library/3.6/DT'
Warning in install.packages :
  installation of package ‘DT’ had non-zero exit status

The downloaded source packages are in
‘C:\Users\Emilia\AppData\Local\Temp\RtmpGutEAX\downloaded_packages’

--
Emília W. Wendt
Mestre em Biologia Animal- UFRGS
PhD Student - UFRGS


Nick Matzke

unread,
Nov 13, 2019, 3:57:40 PM11/13/19
to bioge...@googlegroups.com
Hi -- I don't know what the R package "DT" is, but that is what is failing.  It is probably a dependency of a dependency of some other package.  I would suggest:

(a) try to install DT by itself first

(b) if that doesn't work, try installing BioGeoBEARS but skip the dependencies

install.packages("ape")
install.packages("rexpokit")
install.packages("cladoRcpp")
library(devtools)
devtools::install_github(repo="nmatzke/BioGeoBEARS", dependencies=FALSE)

Cheers,
Nick

--
You received this message because you are subscribed to the Google Groups "BioGeoBEARS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to biogeobears...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/biogeobears/CAEpvJA7UQ4HVrpe6mkDEJkDv4nENxUruVHNmoMoRni%2ByZdXJnQ%40mail.gmail.com.

Emília Wendt

unread,
Nov 13, 2019, 4:06:55 PM11/13/19
to bioge...@googlegroups.com
I made this, but i don't know why, but the program don't instal

________________________________________________________________________________________________________
> install.packages("DT")
Installing package into ‘D:/Usuário/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)

  There is a binary version available but the source version is later:
   binary source needs_compilation
DT    0.9   0.10             FALSE

installing the source package ‘DT’

tentando a URL 'https://cran.rstudio.com/src/contrib/DT_0.10.tar.gz'
Content type 'application/x-gzip' length 831499 bytes (812 KB)
downloaded 812 KB

* installing *source* package 'DT' ...
** package 'DT' successfully unpacked and MD5 sums checked
** using staged installation
Warning in file(file, if (append) "a" else "w") :
  cannot open file 'D:/Usuario/Documents/R/win-library/3.6/00LOCK-DT/00new/DT/DESCRIPTION': No such file or directory
Error in file(file, if (append) "a" else "w") :
  não é possível abrir a conexão
ERROR: installing package DESCRIPTION failed for package 'DT'
* removing 'D:/Usuário/Documents/R/win-library/3.6/DT'
Warning in install.packages :
  installation of package ‘DT’ had non-zero exit status

The downloaded source packages are in
‘C:\Users\Emilia\AppData\Local\Temp\RtmpsZjvqs\downloaded_packages’

Nick Matzke

unread,
Nov 13, 2019, 4:09:33 PM11/13/19
to bioge...@googlegroups.com
Hi -- DT isn't my package so I don't know what is going on.  But installing the binary is either than installing the source:

There are binaries available:

So try:
install.packages("DT", type="binary")

Cheers,
Nick


Nick Matzke

unread,
Nov 13, 2019, 4:10:05 PM11/13/19
to bioge...@googlegroups.com
typo:
"installing the binary is either than installing the source" -> "installing the binary is easy than installing the source"

Nick Matzke

unread,
Nov 13, 2019, 4:10:20 PM11/13/19
to bioge...@googlegroups.com
On Thu, Nov 14, 2019 at 10:09 AM Nick Matzke <nickmat...@gmail.com> wrote:
typo:
"installing the binary is either than installing the source" -> "installing the binary is easy than installing the source"

-> "installing the binary is easier than installing the source"

Emília Wendt

unread,
Nov 13, 2019, 4:32:55 PM11/13/19
to bioge...@googlegroups.com
ok, it's worked

But now, BioGeoBEARS don't work...
_____________________________________________________________________________

> library(devtools)
Carregando pacotes exigidos: usethis

> devtools::install_github(repo="nmatzke/BioGeoBEARS", dependencies=FALSE)
Downloading GitHub repo nmatzke/BioGeoBEARS@master
√  checking for file 'C:\Users\Emilia\AppData\Local\Temp\RtmpINq8xu\remotes13e4bb84214\nmatzke-BioGeoBEARS-c265b3d/DESCRIPTION' ...
-  preparing 'BioGeoBEARS': (582ms)
√  checking DESCRIPTION meta-information ...
-  checking for LF line-endings in source and make files and shell scripts
-  checking for empty or unneeded directories
-  building 'BioGeoBEARS_1.1.2.tar.gz'
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     'BioGeoBEARS/inst/extdata/examples/BSM_3taxa/M3areas_allowed/3taxa_BAYAREALIKE_M3areas_allowed_v1.Rdata'
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     'BioGeoBEARS/inst/extdata/examples/BSM_3taxa/M3areas_allowed/3taxa_BAYAREALIKE_vs_BAYAREALIKE+J_M3areas_allowed_v1.pdf'
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     'BioGeoBEARS/inst/extdata/examples/BSM_3taxa/M3areas_allowed/3taxa_DEC_vs_DEC+J_M3areas_allowed_v1.pdf'
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     'BioGeoBEARS/inst/extdata/examples/BSM_3taxa/M3areas_allowed/3taxa_DIVALIKE+J_M3areas_allowed_v1.Rdata'
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     'BioGeoBEARS/inst/extdata/examples/BSM_3taxa/M3areas_allowed/3taxa_DIVALIKE_vs_DIVALIKE+J_M3areas_allowed_v1.pdf'
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     'BioGeoBEARS/inst/extdata/examples/BSM_3taxa/M3areas_allowed/BAYAREALIKE_histograms_of_event_counts.pdf'
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     'BioGeoBEARS/inst/extdata/examples/Psychotria_M0_BSM_to_simmap/BSM_to_simmap/script_BSM_to_phytools_v3strat.R'
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     'BioGeoBEARS/inst/extdata/examples/Psychotria_M0_BSM_to_simmap/LGcpp/Psychotria_5.2.newick.bgsplits.tre'
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     'BioGeoBEARS/inst/extdata/examples/Psychotria_M0_BSM_to_simmap/LGcpp/Psychotria_5.2.newick.bgstates.tre'
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     'BioGeoBEARS/inst/extdata/examples/Psychotria_M3strat/BSM_to_simmap/50BSMs_in_phytools_simmap_format.pdf'
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     'BioGeoBEARS/inst/extdata/examples/Psychotria_M3strat/BSM_to_simmap/DEC_histograms_of_event_counts.pdf'
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     'BioGeoBEARS/inst/extdata/examples/Psychotria_M3strat/BSM_to_simmap/Psychotria_BAYAREALIKE+J_M3areas_allowed_v1.Rdata'
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     'BioGeoBEARS/inst/extdata/examples/Psychotria_M3strat/BSM_to_simmap/Psychotria_BAYAREALIKE_M3areas_allowed_v1.Rdata'
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     'BioGeoBEARS/inst/extdata/examples/Psychotria_M3strat/BSM_to_simmap/Psychotria_BAYAREALIKE_vs_BAYAREALIKE+J_M3areas_allowed_v1.pdf'
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     'BioGeoBEARS/inst/extdata/examples/Psychotria_M3strat/BSM_to_simmap/Psychotria_DEC+J_M3areas_allowed_v1.Rdata'
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     'BioGeoBEARS/inst/extdata/examples/Psychotria_M3strat/BSM_to_simmap/Psychotria_DEC_M3areas_allowed_v1.Rdata'
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     'BioGeoBEARS/inst/extdata/examples/Psychotria_M3strat/BSM_to_simmap/Psychotria_DEC_vs_DEC+J_M3areas_allowed_v1.pdf'
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     'BioGeoBEARS/inst/extdata/examples/Psychotria_M3strat/BSM_to_simmap/Psychotria_DIVALIKE+J_M3areas_allowed_v1.Rdata'
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     'BioGeoBEARS/inst/extdata/examples/Psychotria_M3strat/BSM_to_simmap/Psychotria_DIVALIKE_M3areas_allowed_v1.Rdata'
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     'BioGeoBEARS/inst/extdata/examples/Psychotria_M3strat/BSM_to_simmap/Psychotria_DIVALIKE_vs_DIVALIKE+J_M3areas_allowed_v1.pdf'
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     'BioGeoBEARS/inst/extdata/examples/Psychotria_M3strat/BSM_to_simmap/RES_ana_events_tables_PARTIAL.Rdata'
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     'BioGeoBEARS/inst/extdata/examples/Psychotria_M3strat/BSM_to_simmap/all_dispersals_counts_fromto_means.txt'
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     'BioGeoBEARS/inst/extdata/examples/Psychotria_M3strat/BSM_to_simmap/all_dispersals_counts_fromto_sds.txt'
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     'BioGeoBEARS/inst/extdata/examples/Psychotria_M3strat/BSM_to_simmap/ana_dispersals_counts_fromto_means.txt'
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     'BioGeoBEARS/inst/extdata/examples/Psychotria_M3strat/BSM_to_simmap/ana_dispersals_counts_fromto_sds.txt'
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     'BioGeoBEARS/inst/extdata/examples/Psychotria_M3strat/BSM_to_simmap/restable_AIC_rellike_formatted.txt'
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     'BioGeoBEARS/inst/extdata/examples/Psychotria_M3strat/BSM_to_simmap/script_BSM_to_phytools_v3strat_OLD.R'

   
Installing package into ‘D:/Usuário/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
* installing *source* package 'BioGeoBEARS' ...
** using staged installation

Error in file(file, if (append) "a" else "w") :
  (convertido do aviso) cannot open file 'D:/Usuario/Documents/R/win-library/3.6/00LOCK-BioGeoBEARS/00new/BioGeoBEARS/DESCRIPTION': No such file or directory
ERROR: installing package DESCRIPTION failed for package 'BioGeoBEARS'
* removing 'D:/Usuário/Documents/R/win-library/3.6/BioGeoBEARS'
Erro: Failed to install 'BioGeoBEARS' from GitHub:
  (convertido do aviso) installation of package ‘C:/Users/Emilia/AppData/Local/Temp/RtmpINq8xu/file13e444cc2170/BioGeoBEARS_1.1.2.tar.gz’ had non-zero exit status

Nick Matzke

unread,
Nov 13, 2019, 4:51:55 PM11/13/19
to bioge...@googlegroups.com
OK, this suggests that the problem is on your system, rather than with the packages.  Both DT and BioGeoBEARS gave you things like:

cannot open file 'D:/Usuario/Documents/R/win-library/3.6/00LOCK-BioGeoBEARS/00new/BioGeoBEARS/DESCRIPTION': No such file or directory
ERROR: installing package DESCRIPTION failed for package 'BioGeoBEARS'

...the part about "00LOCK" and "no such file" for the DESCRIPTION file (which is *definitely* in the BioGeoBEARS package) suggests that you have some file permissions issue with installing packages.  Maybe you are on a network computer or something and don't have permission to install into that directory?

I don't have Windows.  Here are some things to try:

1. Download and install Rtools on your Windows computer:

2. Uninstall BioGeoBEARS, close Rstudio or whatever R program you are using, and then manually delete the directory D:/Usuario/Documents/R/win-library/3.6/00LOCK-BioGeoBEARS/ if it is still found

3. Reboot your system

4. Try re-installing BioGeoBEARS with:

devtools::install_github(repo="nmatzke/BioGeoBEARS", dependencies=FALSE, build_opts=c("--no-lock"))

5. Keep trouble-shooting and googling on your error messages if you still get them.  (You can mostly ignore warnings, but errors are real problems.)

Some google hits I found:

Cheers,
Nick


Juancho Calleja

unread,
Dec 30, 2019, 11:45:03 AM12/30/19
to BioGeoBEARS
Dear Nick, 

I am also struggling with BioGeoBEARS installation. I have been reading thought out your tips (https://github.com/nmatzke/BioGeoBEARS) and this forum, but I am unable to load BioGeobears by using Rstudio and R 6.3.2.
After loading ape, rexpokit, cladoRcpp, Rtools, devtools, and executing  I always get the following nessage: 

Installing package into ‘C:/Users/Juancho/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
ERROR: dependency 'kexpmv' is not available for package 'BioGeoBEARS'
* removing 'C:/Users/Juancho/Documents/R/win-library/3.6/BioGeoBEARS'
Error: Failed to install 'BioGeoBEARS' from GitHub:
  (converted from warning) installation of package ‘C:/Users/Juancho/AppData/Local/Temp/RtmpoDnBbE/file44805f4a5f42/BioGeoBEARS_1.1.2.tar.gz’ had non-zero exit status

I would really appreciate some help to understand the problem and get the way to fix it or overcome it. 
Cheers
Juancho

Nick Matzke

unread,
Jan 7, 2020, 5:01:34 PM1/7/20
to bioge...@googlegroups.com
Hi -- if you didn't figure out the kexpmv error yet, the error you got is with the kexpmv package.  

This was addressed in this post:

Which refers to:

Which says:
================
Archiving CRAN binaries of R packages (because CRAN only archives source code, not binaries)

This repository simply archives the CRAN-generated binaries of R packages necessary/useful for BioGeoBEARS. Initially these are: cladoRcpp (see also GitHub cladoRcpp), rexpokit (see also GitHub rexpokit), and kexpmv.

It seems to be a regular issue that CRAN changes its choice of compilers for C++ and FORTRAN. Most recently, in October 2019, packages were tested against gfortran/gcc10 (which is still in beta). When this happens, legacy FORTRAN code can throw CRAN warnings, despite having passed all previous checks, and then CRAN can decide to archive a package. This means it will no longer be visible in the "package search" functions in R.app or RStudio.

For archived packages, CRAN does keep the source code available, but the compiled binaries for Windows and Mac OS X disappear. This can be very inconvenient, because:

Binaries install very quickly, installing from source can take minutes (if it succeeds at all).

Binaries do not require compilation of the source code on the user's computer.

Therefore, binaries do not require that the user install the compilers gfortran and gcc. Installing these compilers is a lengthy process which can take hours (see e.g. https://solarianprogrammer.com/2017/05/21/compiling-gcc-macos/ for the Mac instructions, regularly updated for each new version of OS X). (See also macports for gcc10.)

GitHub versions of the packages also require compilation-from-source. If you have a "pure R" package (like BioGeoBEARS), this is easy and fast, but if the source code contains C++ or FORTRAN, getting the right compilers and settings can be onerous for non-advanced users.

Getting non-technical users to install gcc and gfortran compilers is onerous at best, and impossible in a 4-hour workshop.

Method

After a CRAN package is accepted, the binaries are typically made available by CRAN within a few days. They are in this section of the package page (this section is for the CRAN cladoRcpp page):

Windows binaries: r-devel: cladoRcpp_0.15.1.zip, r-release: cladoRcpp_0.15.1.zip, r-oldrel: cladoRcpp_0.15.1.zip
OS X binaries: r-release: cladoRcpp_0.15.1.tgz, r-oldrel: cladoRcpp_0.15.1.tgz

All I have done in the "Matzke_R_binaries" repository is put up the saved versions of these binary files.

Instructions

First, navigate to the most recent version number of a package, and click "Download" to download from GitHub.

Second, install the downloaded package manually:

In R.app on Macs, you would click Packages & Data -> Package Installer -> Packages Repository ("Local Binary Package" option) -> click "Install..." -> navigate to the saved binary file.

From the R command line, type something like this:

install.packages(pkgs="/GitHub/Matzke_R_binaries/cladoRcpp/cladoRcpp_0.15.1_MacRrelease.tgz", lib="/Library/Frameworks/R.framework/Resources/library/", repos=NULL, type="binary")

...or, if you have used setwd() to have the working directory set to where the binary was saved, and if you are happy with the default install location, this will probably work:

install.packages(pkgs="cladoRcpp_0.15.1_MacRrelease.tgz", repos=NULL, type="binary")
================

Cheers,
Nick

--
You received this message because you are subscribed to the Google Groups "BioGeoBEARS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to biogeobears...@googlegroups.com.

Gajaba Ellepola

unread,
Jan 9, 2020, 8:37:56 AM1/9/20
to bioge...@googlegroups.com
Dear Nick,

Thank you very much for adding me to the group. I will go through it and see hoe it works.

Thanks alot for your response.

Best Regards,
Gajaba

Juancho Calleja

unread,
Jan 20, 2020, 11:11:01 AM1/20/20
to BioGeoBEARS
Thanks Nick,

I finally fix it! It currently runs. However I still get an error message: Error in numstates_from_numareas(numareas = 8, maxareas = 8, include_null_range = TRUE) :  could not find function "numstates_from_numareas". 
I have tried to reload the package cladoRcpp-package without positive results.

Cheers

Juancho  

Nick Matzke

unread,
Jan 20, 2020, 3:38:34 PM1/20/20
to bioge...@googlegroups.com
Just make sure you do:

library(rexpokit)
library(cladoRcpp)
library(BioGeoBEARS)

...and it should work.

Cheers,
Nick


--
You received this message because you are subscribed to the Google Groups "BioGeoBEARS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to biogeobears...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages