R install package loaded namespace

后端 未结 3 1237
迷失自我
迷失自我 2021-01-21 08:09

I would like to install the package plotly in RStudio and got a error message.

install.packages(\"~/Desktop/plotly_4.5.2.tar.gz\", repos = NULL, type = \"source\

相关标签:
3条回答
  • 2021-01-21 08:50

    I use devtools to install the Rcpp:

    devtools::install_github("RcppCore/Rcpp")
    

    Then the version of Rcpp has changed:

    > packageVersion("Rcpp")
    [1] ‘1.0.1’
    

    And I load the tidyverse and see it is successfull.

    > library(tidyverse)
    ── Attaching packages ─────────────────────────────────────── tidyverse 1.2.1 ──
    ✔ ggplot2 3.0.0       ✔ purrr   0.2.5  
    ✔ tibble  2.1.1       ✔ dplyr   0.8.0.1
    ✔ tidyr   0.8.1       ✔ stringr 1.3.1  
    ✔ readr   1.1.1       ✔ forcats 0.3.0  
    ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
    ✖ dplyr::filter() masks stats::filter()
    ✖ dplyr::lag()    masks stats::lag()
    
    0 讨论(0)
  • 2021-01-21 09:02

    I also faced a similar issue. I restarted the R session and reinstalled both packages.

    install.packages("Rcpp")
    install.packages("plotly")
    

    In my case, I was not able to load dplyr package. So, first I installed Rcpp package and then installed dplyr package. This solved my problem.

    0 讨论(0)
  • 2021-01-21 09:13

    sometimes you just did not restart your R studio after update. For example,

    update.packages(ask=F)
    

    After this, you should restart your R studio. Then

    devtools::install_github("RcppCore/Rcpp")
    
    0 讨论(0)
提交回复
热议问题