Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

viewRGB breaks because argument method is missing #125

Closed
tim-salabim opened this issue Feb 2, 2018 · 12 comments
Closed

viewRGB breaks because argument method is missing #125

tim-salabim opened this issue Feb 2, 2018 · 12 comments

Comments

@tim-salabim
Copy link
Member

Reported here:
rstudio/leaflet#212

@mikel89larioja
Copy link

Hi,
I want to add a sentinel 2 image subset to a leaflet map, but I cannot.
First, I try to apply this code and then I will do it with my image.
library(mapview) viewRGB(poppendorf, 4, 3, 2)
But I get this error:

Error in raster::projectRaster(x, raster::projectExtent(x, crs = sp::CRS(wmcrs)), :
argument "method" is missing, with no default

Can anybody help me?
Thanks,

MIKEL

@tim-salabim
Copy link
Member Author

@mikel89larioja this is fixed in the development branch of the package which you can install with

devtools::install_github("r-spatial/mapview@develop")

@mikel89larioja
Copy link

Thanks for your time @tim-salabim, I install the package again, but the error continues.

@tim-salabim
Copy link
Member Author

Can you pls post your sessionInfo() after installation of the mapview develop branch

@mikel89larioja
Copy link

mikel89larioja commented Feb 5, 2018

sessionInfo()

R version 3.4.3 (2017-11-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

Matrix products: default

locale:
[1] LC_COLLATE=Spanish_Spain.1252 LC_CTYPE=Spanish_Spain.1252 LC_MONETARY=Spanish_Spain.1252 LC_NUMERIC=C
[5] LC_TIME=Spanish_Spain.1252

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

loaded via a namespace (and not attached):
[1] httr_1.3.1 compiler_3.4.3 R6_2.2.2 tools_3.4.3 withr_2.1.0 curl_3.1 yaml_2.1.16
[8] memoise_1.1.0 git2r_0.19.0 digest_0.6.12 devtools_1.13.4

@tim-salabim
Copy link
Member Author

tim-salabim commented Feb 5, 2018

sorry, I meant after installing and loading mapview

@mikel89larioja
Copy link

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

other attached packages:
[1] mapview_2.3.0

loaded via a namespace (and not attached):
[1] Rcpp_0.12.15 pillar_1.1.0 compiler_3.4.3 git2r_0.19.0 plyr_1.8.4 class_7.3-14
[7] R.methodsS3_1.7.1 R.utils_2.6.0 base64enc_0.1-3 iterators_1.0.9 tools_3.4.3 gdalUtils_2.0.1.7
[13] digest_0.6.12 viridisLite_0.3.0 satellite_1.0.1 memoise_1.1.0 lattice_0.20-35 rlang_0.1.4
[19] png_0.1-7 foreach_1.4.4 DBI_0.7 shiny_1.0.5 crosstalk_1.0.0 curl_3.1
[25] yaml_2.1.16 rgdal_1.2-16 e1071_1.6-8 withr_2.1.0 httr_1.3.1 raster_2.6-7
[31] htmlwidgets_1.0 devtools_1.13.4 webshot_0.5.0 classInt_0.1-24 stats4_3.4.3 leaflet_1.1.0
[37] grid_3.4.3 sf_0.6-0 R6_2.2.2 sp_1.2-7 udunits2_0.13 magrittr_1.5
[43] units_0.4-6 scales_0.5.0 codetools_0.2-15 htmltools_0.3.6 mime_0.5 xtable_1.8-2
[49] colorspace_1.3-2 httpuv_1.3.5 munsell_0.4.3 R.oo_1.21.0

@tim-salabim
Copy link
Member Author

so you didn't install mapview from github. If you do, the problem should be solved.

@mikel89larioja
Copy link

mikel89larioja commented Feb 6, 2018

I have tried to install it from GitHub, but I could not. Maybe It is due to I am not in my personal computer and I cannot install some things. I got this error:

devtools::install_github("r-spatial/mapview@develop")
Downloading GitHub repo r-spatial/mapview@develop
from URL https://api.github.com/repos/r-spatial/mapview/zipball/develop
Installing mapview
"C:/PROGRA1/R/R-341.3/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL
"C:/Users/mvinuales/AppData/Local/Temp/RtmpOwvE3s/devtools11507ea9669f/r-spatial-mapview-321dc70"
--library="C:/Users/mvinuales/Documents/R/win-library/3.4" --install-tests

ERROR: dependency 'stars' is not available for package 'mapview'

  • removing 'C:/Users/mvinuales/Documents/R/win-library/3.4/mapview'
    In R CMD INSTALL
    Installation failed: Command failed (1)

@tim-salabim
Copy link
Member Author

You need to install package stars

devtools::install_github("r-spatial/stars")

@mikel89larioja
Copy link

Thanks @tim-salabim, after installing package stars the problem is solved.
Regards,

MIKEL

@tim-salabim
Copy link
Member Author

glad to help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants