This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Error in loadNamespace(name) : there is no package called ‘shiny’

Trying this

MetaOmics tutorial using R language in windows

But after installation of "shiny package" when trying this script

shiny::runApp('metaOmics', port=9987, launch.browser=T)

it is showing Error

Error in loadNamespace(name) : there is no package called ‘shiny’

How to solve this problem?

metaqc r r-studio geodatasets metaomics

What did it say when you ran install.packages(shiny)? I am guessing the shiny installation was unsuccessful.

install.packages("shiny")

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 ‘C:/Users/kiit1/Documents/R/win-library/3.3’ (as ‘lib’ is unspecified) also installing the dependencies ‘magrittr’, ‘sass’, ‘httpuv’, ‘digest’, ‘htmltools’, ‘later’, ‘promises’, ‘rlang’, ‘fastmap’, ‘commonmark’, ‘glue’, ‘bslib’, ‘cachem’, ‘ellipsis’, ‘lifecycle’

There are binary versions available but the source versions are later: binary source needs_compilation magrittr 1.5 2.0.1 FALSE httpuv 1.4.1 1.6.0 TRUE digest 0.6.14 0.6.27 TRUE htmltools 0.3.6 0.5.1.1 TRUE later 0.7.1 1.2.0 TRUE promises 1.0.1 1.2.0.1 TRUE rlang 0.2.0 0.4.10 TRUE commonmark 1.4 1.7 TRUE glue 1.2.0 1.4.2 TRUE shiny 1.0.5 1.6.0 FALSE

Binaries will be installed Packages which are only available in source form, and may need compilation of C/C++/Fortran: ‘sass’ ‘fastmap’ ‘cachem’ ‘ellipsis’ These will not be installed trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/httpuv_1.4.1.zip' Content type 'application/zip' length 1118480 bytes (1.1 MB) downloaded 1.1 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/digest_0.6.14.zip' Content type 'application/zip' length 173830 bytes (169 KB) downloaded 169 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/htmltools_0.3.6.zip' Content type 'application/zip' length 617476 bytes (603 KB) downloaded 603 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/later_0.7.1.zip' Content type 'application/zip' length 605749 bytes (591 KB) downloaded 591 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/promises_1.0.1.zip' Content type 'application/zip' length 646670 bytes (631 KB) downloaded 631 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/rlang_0.2.0.zip' Content type 'application/zip' length 754726 bytes (737 KB) downloaded 737 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/commonmark_1.4.zip' Content type 'application/zip' length 267030 bytes (260 KB) downloaded 260 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/glue_1.2.0.zip' Content type 'application/zip' length 72364 bytes (70 KB) downloaded 70 KB

package ‘httpuv’ successfully unpacked and MD5 sums checked package ‘digest’ successfully unpacked and MD5 sums checked package ‘htmltools’ successfully unpacked and MD5 sums checked package ‘later’ successfully unpacked and MD5 sums checked package ‘promises’ successfully unpacked and MD5 sums checked package ‘rlang’ successfully unpacked and MD5 sums checked package ‘commonmark’ successfully unpacked and MD5 sums checked package ‘glue’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in C:\Users\kiit1\AppData\Local\Temp\RtmpSoxEPo\downloaded_packages installing the source packages ‘magrittr’, ‘bslib’, ‘lifecycle’, ‘shiny’

trying URL 'https://cran.rstudio.com/src/contrib/magrittr_2.0.1.tar.gz' Content type 'application/x-gzip' length 265580 bytes (259 KB) downloaded 259 KB

trying URL 'https://cran.rstudio.com/src/contrib/bslib_0.2.4.tar.gz' Content type 'application/x-gzip' length 3481982 bytes (3.3 MB) downloaded 3.3 MB

trying URL 'https://cran.rstudio.com/src/contrib/lifecycle_1.0.0.tar.gz' Content type 'application/x-gzip' length 83389 bytes (81 KB) downloaded 81 KB

trying URL 'https://cran.rstudio.com/src/contrib/shiny_1.6.0.tar.gz' Content type 'application/x-gzip' length 4170497 bytes (4.0 MB) downloaded 4.0 MB

  • installing source package 'magrittr' ... package 'magrittr' successfully unpacked and MD5 sums checked libs

*** arch - i386 Warning: running command 'make -f "C:/PROGRA~1/R/R-33~1.1/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-33~1.1/share/make/winshlib.mk" SHLIB="magrittr.dll" OBJECTS="pipe.o utils.o"' had status 127 ERROR: compilation failed for package 'magrittr'

  • removing 'C:/Users/kiit1/Documents/R/win-library/3.3/magrittr' Warning in install.packages : running command '"C:/PROGRA~1/R/R-33~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\kiit1\Documents\R\win-library\3.3" C:\Users\kiit1\AppData\Local\Temp\RtmpSoxEPo/downloaded_packages/magrittr_2.0.1.tar.gz' had status 1 Warning in install.packages : installation of package ‘magrittr’ had non-zero exit status
  • installing source package 'lifecycle' ... package 'lifecycle' successfully unpacked and MD5 sums checked R inst preparing package for lazy loading Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : namespace 'rlang' 0.2.0 is being loaded, but >= 0.4.10 is required ERROR: lazy loading failed for package 'lifecycle'
  • removing 'C:/Users/kiit1/Documents/R/win-library/3.3/lifecycle' Warning in install.packages : running command '"C:/PROGRA~1/R/R-33~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\kiit1\Documents\R\win-library\3.3" C:\Users\kiit1\AppData\Local\Temp\RtmpSoxEPo/downloaded_packages/lifecycle_1.0.0.tar.gz' had status 1 Warning in install.packages : installation of package ‘lifecycle’ had non-zero exit status ERROR: dependencies 'sass', 'magrittr' are not available for package 'bslib'
  • removing 'C:/Users/kiit1/Documents/R/win-library/3.3/bslib' Warning in install.packages : running command '"C:/PROGRA~1/R/R-33~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\kiit1\Documents\R\win-library\3.3" C:\Users\kiit1\AppData\Local\Temp\RtmpSoxEPo/downloaded_packages/bslib_0.2.4.tar.gz' had status 1 Warning in install.packages : installation of package ‘bslib’ had non-zero exit status ERROR: dependencies 'fastmap', 'bslib', 'cachem', 'ellipsis', 'lifecycle' are not available for package 'shiny'
  • removing 'C:/Users/kiit1/Documents/R/win-library/3.3/shiny' Warning in install.packages : running command '"C:/PROGRA~1/R/R-33~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\kiit1\Documents\R\win-library\3.3" C:\Users\kiit1\AppData\Local\Temp\RtmpSoxEPo/downloaded_packages/shiny_1.6.0.tar.gz' had status 1 Warning in install.packages : installation of package ‘shiny’ had non-zero exit status

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

how to install it properly?

As your output indicates, you need to install Rtools first. Take peek here if you need to figure out how to to install it on a Windows machine. Try installing shiny after that, and it should probably work assuming no other prerequisites are unsatisfied.

0 answers

No answers yet.

Log in to answer this question.