Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation failure due to modes package #105

Open
avportal opened this issue Jun 14, 2020 · 9 comments
Open

Installation failure due to modes package #105

avportal opened this issue Jun 14, 2020 · 9 comments

Comments

@avportal
Copy link

avportal commented Jun 14, 2020

Hi there,

I am trying to install the package but I get the following error message:

ERROR: dependency ‘modes’ is not available for package ‘MicrobiomeR’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/MicrobiomeR’
Error: Failed to install 'MicrobiomeR' from GitHub:
  (converted from warning) installation of package ‘/var/folders/st/y2p98lbd0y58731wvyg2rgpc0000gp/T//RtmpI4UmRD/fileefb13850b96/MicrobiomeR_0.6.1.tar.gz’ had non-zero exit status

> install.packages("modes")
Warning in install.packages :
  package ‘modes’ is not available (for R version 3.6.3)

It seems that the package "modes" has been removed from the CRAN repository.

Insert Session info here

R version 3.6.3 (2020-02-29)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Mojave 10.14.6

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods  
[7] base     

other attached packages:
[1] phyloseq_1.30.0 devtools_2.3.0  usethis_1.6.1  

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.4.6        ape_5.4             lattice_0.20-41    
 [4] prettyunits_1.1.1   ps_1.3.3            Biostrings_2.54.0  
 [7] assertthat_0.2.1    rprojroot_1.3-2     digest_0.6.25      
[10] foreach_1.5.0       R6_2.4.1            plyr_1.8.6         
[13] backports_1.1.7     stats4_3.6.3        ggplot2_3.3.1      
[16] pillar_1.4.4        zlibbioc_1.32.0     rlang_0.4.6        
[19] curl_4.3            rstudioapi_0.11     data.table_1.12.8  
[22] vegan_2.5-6         callr_3.4.3         S4Vectors_0.24.4   
[25] Matrix_1.2-18       splines_3.6.3       desc_1.2.0         
[28] stringr_1.4.0       igraph_1.2.5        munsell_0.5.0      
[31] compiler_3.6.3      pkgconfig_2.0.3     BiocGenerics_0.32.0
[34] multtest_2.42.0     pkgbuild_1.0.8      mgcv_1.8-31        
[37] tidyselect_1.1.0    biomformat_1.14.0   tibble_3.0.1       
[40] IRanges_2.20.2      codetools_0.2-16    permute_0.9-5      
[43] fansi_0.4.1         dplyr_1.0.0         crayon_1.3.4       
[46] withr_2.2.0         MASS_7.3-51.6       grid_3.6.3         
[49] nlme_3.1-148        jsonlite_1.6.1      gtable_0.3.0       
[52] lifecycle_0.2.0     magrittr_1.5        scales_1.1.1       
[55] cli_2.0.2           stringi_1.4.6       XVector_0.26.0     
[58] reshape2_1.4.4      fs_1.4.1            remotes_2.1.1      
[61] testthat_2.3.2      generics_0.0.2      ellipsis_0.3.1     
[64] vctrs_0.3.1         Rhdf5lib_1.8.0      iterators_1.0.12   
[67] tools_3.6.3         ade4_1.7-15         Biobase_2.46.0     
[70] glue_1.4.1          purrr_0.3.4         survival_3.1-12    
[73] processx_3.4.2      pkgload_1.1.0       parallel_3.6.3     
[76] colorspace_1.4-1    rhdf5_2.30.1        cluster_2.1.0      
[79] sessioninfo_1.1.1   memoise_1.1.0
@sdhutchins sdhutchins self-assigned this Jun 15, 2020
@sdhutchins sdhutchins changed the title problems installing microbiomeR Installation failure due to modes package Jun 15, 2020
@sdhutchins sdhutchins pinned this issue Jun 15, 2020
@grabear
Copy link
Member

grabear commented Jul 7, 2020

Hi @avportal. I'm very sorry it took this long to get back to you fully. It seems that you are correct about the modes package. We only use one function from there (shown below). It shouldn't be to hard to port it over, and remove the modes as a dependency completely. I will work on this tomorrow and try to get the changes update for you.

bimodality_coefficient<-function(x, finite=TRUE,...){
	if(finite==TRUE){
		G=skewness(x,finite)
		sample.excess.kurtosis=kurtosis(x,finite)
		K=sample.excess.kurtosis
		n=length(x)
		B=((G^2)+1)/(K+ ((3*((n-1)^2))/((n-2)*(n-3))))
	}
	else{
		G=skewness(x,FALSE)
		K=kurtosis(x,FALSE)
		B=((G^2)+1)/(K)
	}
	return(B)
}

@grabear
Copy link
Member

grabear commented Jul 7, 2020

@sdhutchins
Copy link
Contributor

@grabear I created this little branch for that. Feel free to delete it. 😃

@avportal
Copy link
Author

avportal commented Jul 8, 2020 via email

@sdhutchins
Copy link
Contributor

sdhutchins commented Aug 9, 2020

@avportal I would suggest installing this release with the latest version of R (4.0).

MicrobiomeR_0.7.0.tar.gz

install.packages("MicrobiomeR_0.7.0.tar.gz", repos = NULL, type ="source")

@avportal
Copy link
Author

avportal commented Aug 10, 2020 via email

@lixiaopi1985
Copy link

work around: download modes package from CRAN: https://cran.r-project.org/web/packages/modes/index.html, and install it locally install_local()

@grabear
Copy link
Member

grabear commented Oct 5, 2020

@lixiaopi1985 Thank you for this workaround. @sdhutchins And thank you for pushing a working release.

@avportal The issue should be fixed by installing MicrobiomeR using @sdhutchins solution. If you have any more issues with this, then please let us know.

The primary reason for the delay with this bug fix was a failure to get our Travis CI and GitHub actions working properly. However, this is a separate issue and should have been treated as one.

@avportal
Copy link
Author

avportal commented Oct 5, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants