1  Installation

If you haven’t installed R or RStudio on your PC or Mac, please install them before proceeding. Otherwise, you can skip these steps.

1.1 Install R

Download the R and install it.

👉 Refer this blog

1.2 Install RStudio

Then install RStudio. Download the RStudio and then install it.

Select the free version of RStudio Desktop.

👉 Refer this blog

1.3 Open the RStudio

Then open the RStudio

1.4 Update R

tidymass require R version > 4.1. Please update your R if the version < 4.1.

You can check your R version in your console:

version
               _                           
platform       aarch64-apple-darwin20      
arch           aarch64                     
os             darwin20                    
system         aarch64, darwin20           
status                                     
major          4                           
minor          4.1                         
year           2024                        
month          06                          
day            14                          
svn rev        86737                       
language       R                           
version.string R version 4.4.1 (2024-06-14)
nickname       Race for Your Life          

If your R version is < 4.1, please download and install the latest version of R, and then restart your R.

1.5 Install tidymass from tidymass.org

Copy and paste the below code in your console.

source("https://www.tidymass.org/tidymass-packages/install_tidymass.txt")
install_tidymass(from = "tidymass.org")

You can also use this method to install one specific package. For example, if you only want to install metid.

install_tidymass(from = "tidymass.org", which_package = "metid")

Demo video is bellow:

If above code doesn’t work, try to change the method argument.

  1. “auto”

  2. “internal”

  3. “libcurl”

  4. “wget”

  5. “curl”

1.6 Install tidymass from GitHub

Copy and paste the below code in your console.

if(!require(remotes)){
  install.packages("remotes")
}
remotes::install_github("tidymass/tidymass", dependencies = TRUE)

1.7 Some issues

  1. During the installation, it will ask if you want to update some packages for few times, just enter Enter or Return key to skip it.

  2. If there is a error like below:

Error: Failed to install ‘tidymass’ from GitHub: HTTP error 403. API rate limit exceeded for 171.66.10.237. (But here’s the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)

Try to resolve it by:

  • In you R console, type this code:
if(!require(usethis)){
  install.packages("usethis")
}
usethis::create_github_token()

It will open a page in browser, and create a “New personal access token” and copy it.

  • Then type this code:
usethis::edit_r_environ()

and then add one line like below:

GITHUB_PAT=YOUR_TOKEN_HERE

The GITHUB_PAT should be yours that is created in step 1.

And then restart R session and try again.

1.8 Install tidymass from GitLab

Copy and paste the below code in your console.

if(!require(remotes)){
  install.packages("remotes")
}
remotes::install_gitlab("tidymass/tidymass", dependencies = TRUE)

1.9 Install tidymass from Gitee

If you are in China, you can try to install tidymass from Gitee. Copy and paste the below code in your console.

if(!require(remotes)){
  install.packages("remotes")
}
remotes::install_git(url = "https://gitee.com/tidymass/tidymass", dependencies = TRUE)

If you can’t install tidymass successfully, please contact us by

{{< cta cta_text="📥 Contact us" cta_link="https://www.tidymass.org/#contact" >}}

or leave me a comment below.

1.10 Session information

sessionInfo()
R version 4.4.1 (2024-06-14)
Platform: aarch64-apple-darwin20
Running under: macOS 15.5

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRblas.0.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.12.0

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

time zone: Asia/Singapore
tzcode source: internal

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

loaded via a namespace (and not attached):
 [1] htmlwidgets_1.6.4 compiler_4.4.1    fastmap_1.2.0     cli_3.6.3        
 [5] tools_4.4.1       htmltools_0.5.8.1 rstudioapi_0.17.1 rmarkdown_2.29   
 [9] knitr_1.49        jsonlite_1.8.9    xfun_0.52         digest_0.6.37    
[13] rlang_1.1.4       evaluate_1.0.1