Installing Tidyverse Packages

I'm having trouble with installing the tidyverse package. I'm trying to follow the Oreilly "R for Data Science" book written by Hadley Wickham and Garrett Grolemund, but at the moment, I'm stuck on step one. Thanks for helping me out!

Listed below is a sample of the my RStudio console whenever I try to install the tidyverse package.

Error Information:

install.packages("tidyverse")
also installing the dependencies ‘knitr’, ‘rmarkdown’, ‘broom’, ‘lubridate’, ‘modelr’, ‘reprex’, ‘stringr’

There are binary versions available but the source versions
are later:
binary source needs_compilation
knitr 1.18 1.21 FALSE
rmarkdown 1.8 1.11 FALSE
broom 0.4.3 0.5.1 FALSE
lubridate 1.7.1 1.7.4 TRUE
modelr 0.1.1 0.1.4 FALSE
stringr 1.2.0 1.4.0 FALSE
tidyverse 1.1.1 1.2.1 FALSE

Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
unknown timezone 'zone/tz/2018i.1.0/zoneinfo/America/Los_Angeles'

  • installing source package ‘stringr’ ...
    ** package ‘stringr’ successfully unpacked and MD5 sums checked
    ** R
    ** data
    *** moving datasets to lazyload DB
    ** inst
    ** preparing package for lazy loading
    Error in library.dynam(lib, package, package.lib) :
    shared object ‘stringi.so’ not found
    ERROR: lazy loading failed for package ‘stringr’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/stringr’
    Warning in install.packages :
    installation of package ‘stringr’ had non-zero exit status

Description of issue -

I'm entirely new to computer programming, so I could be wrong in even diagnosing the problem. But it seems as if the inability of the library.dynam function to find the stringi.so package is causing a chain reaction of installation failures.

Steps taken so far -

So far, I have gone to https://developer.apple.com/ and installed "Command Line Tools (macOS 10.13) for Xcode 9.4.1." I hoped that this would help with the unknown timezone issue.

System Information:

  • RStudio Edition: (Desktop or Server) ???
  • RStudio Version: Version 1.1.463
  • OS Version: 10.13.16
  • R Version: ???

From Troubleshooting Guide: Using RStudio

Do you have stringi :package: already installed ? stringr needs stringi.

I don't know why it does not install if if missing. You can try install.packages("tidyverse", dependencies = TRUE) to install everything tidyverse depends on.

Thanks, cderv, for the advice. I think you've solved the problem.

I used the function install.packages("tidyverse", dependencies = TRUE) and was prompted to try removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/00LOCK-stringi’

Then I performed the following functions:

install.packages("stringi")
install.packages("stringr")
install.packages("tidyverse")

Now, all of the packages appear to be installed now.

What does 'dependencies = TRUE' mean/do? I didn't get the prompt that I needed until I tried it out.

Packages that require the use of other packages are said to have dependencies. By including "dependencies=TRUE" with install.packages(), you are saying "yes, I would also like to install the packages upon which the main package depends."

1 Like

@Chuck answered your question !

If your question's been answered, would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it:

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.