Как установить последний rlang и dplyr?

Я хочу выполнить сценарий, который запускается с

library(dplyr)  
library(lubridate)  
library(ggplot2)  

Я начал с постоянным клиентом r-base-core и r-cran-lubridate установленный. Я добрался:

Error in mutate_impl(.data, dots) : 
  Evaluation error: `as_dictionary()` is defunct as of rlang 0.3.0.
Please use `as_data_pronoun()` instead.

(сам код не использует mutate_impl это, кажется, эта проблема https://github.com/r-lib/rlang/issues/674, предлагая обновление dplyr

r версия был R version 3.4.4 (2018-03-15) для dplyr я не знал, как узнать.

Таким образом, я изменил источник, как описано в другом месте: добавленный deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/ кому: /etc/apt/sources.list

sudo apt-get update
sudo apt-get install r-base
sudo apt-get install r-cran-dplyr
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 r-cran-dplyr : Depends: r-api-3.4
                Depends: r-cran-assertthat but it is not going to be installed
                Depends: r-cran-bindrcpp (>= 0.2) but it is not going to be installed
                Depends: r-cran-glue (>= 1.1.1) but it is not going to be installed
                Depends: r-cran-magrittr but it is not going to be installed
                Depends: r-cran-pkgconfig but it is not going to be installed
                Depends: r-cran-rlang (>= 0.1.2) but it is not going to be installed
                Depends: r-cran-r6 but it is not going to be installed
                Depends: r-cran-rcpp (>= 0.12.7) but it is not going to be installed
                Depends: r-cran-tibble (>= 1.3.1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Я работал

sudo apt-get remove r-*
sudo apt-get clean
sudo apt-get autoclean
sudo apt-get update
sudo apt-get install r-base
sudo apt-get install r-cran-dplyr

но ничто не изменилось.
Установка его из оболочки R не работает также:

> install.packages("dplyr")
Installing package into ‘/home/_/R/x86_64-pc-linux-gnu-library/3.5’
(as ‘lib’ is unspecified)
also installing the dependencies ‘pillar’, ‘purrr’, ‘bindrcpp’, ‘tibble’, ‘tidyselect’

trying URL 'https://cloud.r-project.org/src/contrib/pillar_1.3.0.tar.gz'...
downloaded 100 KB

trying URL 'https://cloud.r-project.org/src/contrib/purrr_0.2.5.tar.gz'...
downloaded 123 KB

trying URL 'https://cloud.r-project.org/src/contrib/bindrcpp_0.2.2.tar.gz'...
downloaded 10212 bytes

trying URL 'https://cloud.r-project.org/src/contrib/tibble_1.4.2.tar.gz'...
downloaded 107 KB

trying URL 'https://cloud.r-project.org/src/contrib/tidyselect_0.2.5.tar.gz'...
downloaded 21 KB

trying URL 'https://cloud.r-project.org/src/contrib/dplyr_0.7.8.tar.gz'...
downloaded 702 KB

* installing *source* package ‘pillar’ ...
** package ‘pillar’ successfully unpacked and MD5 sums checked
** R
** byte-compile and prepare package for lazy loading
Error : package ‘rlang’ was installed by an R version with different internals; it needs to be reinstalled for use with this R version
ERROR: lazy loading failed for package ‘pillar’
* removing ‘/home/_/R/x86_64-pc-linux-gnu-library/3.5/pillar’
* installing *source* package ‘bindrcpp’ ...
** package ‘bindrcpp’ successfully unpacked and MD5 sums checked
** libs
g++  -I"/usr/share/R/include" -DNDEBUG -I../inst/include -I. -I"/home/_/R/x86_64-pc-linux-gnu-library/3.5/plogr/include" -I"/usr/local/lib/R/site-library/Rcpp/include"    -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-oUvOgu/r-base-3.5.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c RcppExports.cpp -o RcppExports.o
g++  -I"/usr/share/R/include" -DNDEBUG -I../inst/include -I. -I"/home/_/R/x86_64-pc-linux-gnu-library/3.5/plogr/include" -I"/usr/local/lib/R/site-library/Rcpp/include"    -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-oUvOgu/r-base-3.5.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c create.cpp -o create.o
g++  -I"/usr/share/R/include" -DNDEBUG -I../inst/include -I. -I"/home/_/R/x86_64-pc-linux-gnu-library/3.5/plogr/include" -I"/usr/local/lib/R/site-library/Rcpp/include"    -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-oUvOgu/r-base-3.5.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c plogr.cpp -o plogr.o
g++  -I"/usr/share/R/include" -DNDEBUG -I../inst/include -I. -I"/home/_/R/x86_64-pc-linux-gnu-library/3.5/plogr/include" -I"/usr/local/lib/R/site-library/Rcpp/include"    -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-oUvOgu/r-base-3.5.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c test.cpp -o test.o
g++ -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o bindrcpp.so RcppExports.o create.o plogr.o test.o -L/usr/lib/R/lib -lR
installing to /home/t/R/x86_64-pc-linux-gnu-library/3.5/bindrcpp/libs
** R
** inst
** byte-compile and prepare package for lazy loading
Error : package ‘Rcpp’ was installed by an R version with different internals; it needs to be reinstalled for use with this R version
ERROR: lazy loading failed for package ‘bindrcpp’
* removing ‘/home/_/R/x86_64-pc-linux-gnu-library/3.5/bindrcpp’
ERROR: dependency ‘pillar’ is not available for package ‘tibble’
* removing ‘/home/_/R/x86_64-pc-linux-gnu-library/3.5/tibble’
ERROR: dependency ‘tibble’ is not available for package ‘purrr’
* removing ‘/home/_/R/x86_64-pc-linux-gnu-library/3.5/purrr’
ERROR: dependency ‘purrr’ is not available for package ‘tidyselect’
* removing ‘/home/_/R/x86_64-pc-linux-gnu-library/3.5/tidyselect’
ERROR: dependencies ‘bindrcpp’, ‘tibble’, ‘tidyselect’ are not available for package ‘dplyr’
* removing ‘/home/_/R/x86_64-pc-linux-gnu-library/3.5/dplyr’

The downloaded source packages are in
    ‘/tmp/Rtmpxim56P/downloaded_packages’
Warning messages:
1: In install.packages("dplyr") :
  installation of package ‘pillar’ had non-zero exit status
2: In install.packages("dplyr") :
  installation of package ‘bindrcpp’ had non-zero exit status
3: In install.packages("dplyr") :
  installation of package ‘tibble’ had non-zero exit status
4: In install.packages("dplyr") :
  installation of package ‘purrr’ had non-zero exit status
5: In install.packages("dplyr") :
  installation of package ‘tidyselect’ had non-zero exit status
6: In install.packages("dplyr") :
  installation of package ‘dplyr’ had non-zero exit status
> 
5
задан 20 November 2018 в 02:21

1 ответ

Я также не мог установить dplyr в Ubuntu 18.04. У меня было версия 3.6.1 R, которая по-видимому вызвала проблему.

я следовал это решение и сделал следующий

sudo add-apt-repository ppa:marutter/c2d4u3.5
sudo apt update
sudo apt install r-cran-dplyr

, который добился цели.

1
ответ дан 23 November 2019 в 10:40

Другие вопросы по тегам:

Похожие вопросы: