1

I would like to loading the magick package in R, but not sure where the error is coming from. Using R version 4.0.5. I think the issue might with tidyverse package as I installed that after properly loading magick, but now it doesn't work at all. Using Windows and RStudio

library(magick)
Error: package or namespace load failed for ‘magick’:
 .onLoad failed in loadNamespace() for 'magick', details:
  call: set_magick_tempdir(tempdir())
  error: function 'Rcpp_precious_remove' not provided by package 'Rcpp'
Jack Armstrong
  • 1,182
  • 4
  • 26
  • 59
  • 1
    I found a blog somewhere in the Internets with a very similar error message proposing to update your `RCpp` installation, e.g., via `update.packages()`. I cannot tell but that somehow seems more likely then a `magick` specific problem. – Bernhard Aug 15 '21 at 18:58

1 Answers1

2

It may be better to not load tidyverse as a package. Perhaps, load those individual packages i.e. library(dplyr);library(tidyr) etc as this works without loading the library(tidyverse)

library(magick)
Linking to ImageMagick 6.9.12.3
Enabled features: cairo, fontconfig, freetype, heic, lcms, pango, raw, rsvg, webp
Disabled features: fftw, ghostscript, x11

The output of sessionInfo() is below

> sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 11.5.1

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRblas.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib

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

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

other attached packages:
 [1] magick_2.7.2      lubridate_1.7.10  janitor_2.1.0     collapse_1.6.2    tibble_3.1.2      purrr_0.3.4       tidyr_1.1.3       dplyr_1.0.7       data.table_1.14.0
[10] overflow_0.2-4    stringr_1.4.0     reshape2_1.4.4   

loaded via a namespace (and not attached):
 [1] splines_4.1.0            gtools_3.8.2             Formula_1.2-4            latticeExtra_0.6-29      numDeriv_2016.8-1.1      pillar_1.6.1            
 [7] backports_1.2.1          lattice_0.20-44          glue_1.4.2               RcppEigen_0.3.3.9.1      digest_0.6.27            RColorBrewer_1.1-2      
[13] checkmate_2.0.0          snakecase_0.11.0         minqa_1.2.4              colorspace_2.0-1         sandwich_3.0-1           htmltools_0.5.1.1       
[19] Matrix_1.3-3             plyr_1.8.6               pkgconfig_2.0.3          broom_0.7.6              weights_1.0.4            scales_1.1.1            
[25] gdata_2.18.0             jpeg_0.1-8.1             lme4_1.1-27              htmlTable_2.2.1          generics_0.1.0           ggplot2_3.3.3           
[31] ellipsis_0.3.2           nnet_7.3-16              cli_2.5.0                survival_3.2-11          magrittr_2.0.1           crayon_1.4.1            
[37] ps_1.6.0                 mice_3.13.0              fansi_0.4.2              nlme_3.1-152             MASS_7.3-54              RcppArmadillo_0.10.4.0.0
[43] foreign_0.8-81           dreamerr_1.2.3           fixest_0.9.0             tools_4.1.0              lifecycle_1.0.0          munsell_0.5.0           
[49] cluster_2.1.2            compiler_4.1.0           rlang_0.4.11             grid_4.1.0               nloptr_1.2.2.2           rstudioapi_0.13         
[55] htmlwidgets_1.5.3        base64enc_0.1-3          boot_1.3-28              gtable_0.3.0             R6_2.5.0                 gridExtra_2.3           
[61] zoo_1.8-9                knitr_1.33               utf8_1.2.1               Hmisc_4.5-0              stringi_1.6.2            parallel_4.1.0          
[67] Rcpp_1.0.6               vctrs_0.3.8              rpart_4.1-15             png_0.1-7                tidyselect_1.1.1         xfun_0.23               
akrun
  • 874,273
  • 37
  • 540
  • 662