hyunsooseol / snowCluster

This module allows users to analyze k-means & hierarchical clustering, and visualize results of Principal Component, Correspondence Analysis, Discriminant analysis, Decision tree, Multidimensional scaling, Multiple Factor Analysis, Machine learning, and Prophet analysis.
http://www.sthda.com/english/wiki/factoextra-r-package-easy-multivariate-data-analyses-and-elegant-visualization
8 stars 2 forks source link

Error when downloading snowCluster in R #28

Closed npaisaca closed 2 months ago

npaisaca commented 2 months ago

Hello,

I am trying to download the snowCluster package for R, but it returns an error when using the devtools command. My code is as follows:

 install.packages("devtools")

 install.packages("haven", "jmvReadWrite", "jmvconnect")

 lapply(c("jmv", "haven", "jmvReadWrite", "jmvconnect"), library, character.only=TRUE)

 devtools::install_github("hyunsooseol/snowCluster")

And this is the output I get:

 Downloading GitHub repo hyunsooseol/snowCluster@HEAD
 Error in utils::download.file(url, path, method = method, quiet = quiet,  : 
   download from 'https://api.github.com/repos/hyunsooseol/snowCluster/tarball/HEAD' failed

Could you please tell me where the error might be?

Thank you!

hyunsooseol commented 2 months ago

Try to run the following commands

library(jmv)

library(jmvReadWrite)

library(jmvconnect)

devtools::install_github("hyunsooseol/snowCluster")

hyunsooseol commented 2 months ago

It is working with the following syntax;

install.packages('jmvReadWrite') install.packages('jmvconnect') library(jmv) library(jmvReadWrite) library(jmvconnect)

install.packages("Rcpp") install.packages("remotes") remotes::install_github("cardiomoon/multipleROC") devtools::install_github("hyunsooseol/snowCluster")

data = jmvReadWrite::read_omv("iris.omv") # example file

snowCluster::kmeans( data = data, vars = vars(Sepal.Length, Sepal.Width, Petal.Length, Petal.Width))

npaisaca commented 2 months ago

Hi,

I tried both syntaxes and it didn't work, I get the same error. I also tried remotes::install_github("hyunsooseol/snowCluster") just in case, but it didn't work either. Everything else installs just fine, I tried both inside my project and in another R file, and the outcome is the same. My R version is 4.3.3.

I found that sometimes, when using the renv package, installation from sources other than CRAN can cause issues. Could this be the problem here since I'm using renv for this project, even though I'm installing the package with devtools and remote?

Thanks!

hyunsooseol commented 2 months ago

Hi

I don't know what the problem is cause it works on my com(WIN 10).

npaisaca commented 2 months ago

Hi again,

I managed to override the problems by using this instruction fron the renv package installation vignette:

renv::install( packages = "hyunsooseol/snowCluster", repos = getOption("repos"), prompt = interactive(), dependencies = NULL, verbose = NULL, lock = FALSE, project = NULL )

snowCluster seems to download correctly this time.

Thanks for everything!

hyunsooseol commented 2 months ago

Oh Great !