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

how to repel boxes correctly? using ggrepel:::repel_boxes() #172

Open
AlvaroMCMC opened this issue Oct 22, 2020 · 8 comments
Open

how to repel boxes correctly? using ggrepel:::repel_boxes() #172

AlvaroMCMC opened this issue Oct 22, 2020 · 8 comments
Labels

Comments

@AlvaroMCMC
Copy link

AlvaroMCMC commented Oct 22, 2020

I am using ggrepel:::repel_boxes() within this function (copied from another post), but I don't know how to set the parameters correctly, and I haven't detailed documentation for me to understand the function.

findboxes <- function(df, xcol, ycol, xlim, ylim,
                      force = 1e-6, maxiter = 20000) {
    
    #x and y positions as a dataframe
    posdf <- df[c(xcol,ycol)]
    
    #returnd a df where columns are points
    boxdf <- apply(posdf,1,function(row) { xval <- row[xcol]
    yval <- row[ycol]
    return(c(xval - 8500, 
             yval - 8500, 
             xval + 8500,
             yval + 8500))})                                       
    # columns are x1,y1,x2,y2
    boxmatrix = as.matrix(t(boxdf))
    
    moved <- ggrepel:::repel_boxes(data_points = as.matrix(posdf),
                                   point_padding_x = 0,
                                   point_padding_y = 0,
                                   boxes = boxmatrix,
                                   xlim = xlim,
                                   ylim = ylim,
                                   hjust = 0,
                                   vjust = 0,
                                   force = force,
                                   maxiter = maxiter)
    
    finaldf <- cbind(posdf, moved)
    names(finaldf) <- c("x1","y1","x2","y2")
    return(finaldf)
}

xminimo <- 290000
xmaximo <- 336000
yminimo <- 8090000
ymaximo <- 8120000

# It's working on a UTM coordinate system WGS84 projected.

newcentroids <- findboxes(data_metales, xcol = "ESTE", ycol= "NORTE",
                 xlim = c(xminimo, xmaximo), ylim = c(yminimo, ymaximo),
                 force = 4000,
                 maxiter = 5000)
@slowkow
Copy link
Owner

slowkow commented Oct 23, 2020

Could I ask if you might be willing to make a reproducible example?

@AlvaroMCMC
Copy link
Author

AlvaroMCMC commented Oct 23, 2020

Thank you for your answer. Sure

# data with coordinates
data_metales
# A tibble: 20 x 3
     NORTE   ESTE data            
     <dbl>  <dbl> <list>          
 1 8102473 326840 <tibble [4 x 3]>
 2 8107492 330516 <tibble [4 x 3]>
 3 8098064 291101 <tibble [4 x 3]>
 4 8108112 323118 <tibble [4 x 3]>
 5 8108512 320323 <tibble [4 x 3]>
 6 8107940 319613 <tibble [4 x 3]>
 7 8107900 319089 <tibble [4 x 3]>
 8 8110684 325103 <tibble [4 x 3]>
 9 8103678 319819 <tibble [4 x 3]>
10 8104314 319306 <tibble [4 x 3]>
11 8103898 318395 <tibble [4 x 3]>
12 8103911 318255 <tibble [4 x 3]>
13 8108793 329578 <tibble [4 x 3]>
14 8107302 330640 <tibble [4 x 3]>
15 8106585 308705 <tibble [4 x 3]>
16 8106045 311069 <tibble [4 x 3]>
17 8105918 310255 <tibble [4 x 3]>
18 8104215 316319 <tibble [4 x 3]>
19 8104466 313872 <tibble [4 x 3]>
20 8103939 316480 <tibble [4 x 3]>
# map's physical limits
xminimo <- 290000
xmaximo <- 336000
yminimo <- 8090000
ymaximo <- 8120000

# function to find new centroids of "repelled boxes"
findboxes <- function(df, xcol, ycol, xlim, ylim,
                      force = 1e-6, maxiter = 20000) {
    
    #x and y positions as a dataframe
    posdf <- df[c(xcol,ycol)]
    
    #returnd a df where columns are points
    boxdf <- apply(posdf,1,function(row) { xval <- row[xcol]
    yval <- row[ycol]
    return(c(xval - 8500, 
             yval - 8500, 
             xval + 8500,
             yval + 8500))})                                       
    # columns are x1,y1,x2,y2
    boxmatrix = as.matrix(t(boxdf))
    
    moved <- ggrepel:::repel_boxes(data_points = as.matrix(posdf),
                                   point_padding_x = 0,
                                   point_padding_y = 0,
                                   boxes = boxmatrix,
                                   xlim = xlim,
                                   ylim = ylim,
                                   hjust = 0,
                                   vjust = 0,
                                   force = force,
                                   maxiter = maxiter)
    
    finaldf <- cbind(posdf, moved)
    names(finaldf) <- c("x1","y1","x2","y2")
    return(finaldf)
}

newcentroids <- findboxes(data_metales, xcol = "ESTE", ycol= "NORTE",
                 xlim = c(xminimo, xmaximo), ylim = c(yminimo, ymaximo),
                 force = 4000,
                 maxiter = 5000)

data_metales %<>%
  cbind(newcentroids) %>%
  dplyr::select(-NORTE, -ESTE, -x1, -y1) %>%
  rename("NORTE" = y2, "ESTE" = x2)

# new data_metales
       ESTE   NORTE
1  327116.9 8102750
2  330787.4 8107763
3  290500.0 8097023
4  325177.9 8110172
5  320598.1 8108780
6  319010.8 8107338
7  320523.4 8109376
8  326711.3 8112292
9  322311.5 8106170
10 318405.1 8103349
11 318001.1 8103562
12 320322.3 8105978
13 330576.6 8109792
14 332007.4 8108669
15 308997.5 8106877
16 312786.5 8107760
17 311850.5 8107517
18 316118.2 8104014
19 314038.3 8104632
20 317628.8 8105091

# function to create circle grobs, 2000 m diameter of circle
annotation_fun <- function(ESTE, NORTE, data) {
  sub_grob <- annotation_custom(circleGrob(),
                                xmin = ESTE - 1000,
                                ymin = NORTE - 1000,
                                xmax = ESTE + 1000,
                                ymax = NORTE + 1000)
}

# creating the list of grobs
sub_grobs <- data_metales %>%
  pmap(annotation_fun)

# then I add them to another ggplot with + sub_grobs and their origin is placed correctly,
# but not the repelled part, as you see in the image below
# (The lines were created with another function as a reference).

Zoom in, origins placed correctly but not the repelled part

I would need to know how to tune the arguments of the repel_boxes function to get the circles separated, I tried the force argument from 0.1 to 8000 and it's not working, and even tried other arguments. Please tell me if you need more information.

@slowkow
Copy link
Owner

slowkow commented Oct 23, 2020

Yes, we need more information in order to help you. Specifically, please consider sharing a snippet of code with a reproducible example that we can run on our own machines.

@AlvaroMCMC
Copy link
Author

AlvaroMCMC commented Oct 24, 2020

This a problem I need to separate into parts, so I post the first part (reprex).

The questions are:
¿Why don't the red lines align with the black lines?
Can I get d to have x and y in UTM coordinate system? like x = 5600000 , y = 1200000?

library(spData)
library(tmap)
library(spDataLarge)
library(tidyverse)
library(raster)
library(sf)
library(knitr)
library(tmaptools)
library(grid)
library(ggrepel)
library(ggsflabel)

# first plot
ggplot() +
  geom_sf(data = nz, aes(color = Name)) +
  geom_sf(data = nz_height) +
  geom_sf_text_repel(data = nz_height, aes(label = elevation), min.segment.length = 0) +
  coord_sf(datum = st_crs(nz_height)) +
  theme(
    legend.position = "none"
  )

grid.force()
kids <- childNames(grid.get("textrepeltree", grep = TRUE))

d <- do.call(rbind, lapply(kids, function(n) {
  x <- grid.get(n)
  data.frame(
    x = convertX(x$x, "native", valueOnly = TRUE),
    y = convertY(x$y, "native", valueOnly = TRUE),
    x.orig = convertX(x$x.orig, "native", valueOnly = TRUE),
    y.orig = convertY(x$y.orig, "native", valueOnly = TRUE)
  )
}))

panelvp <- grid.grep("panel", grobs = FALSE, viewports = TRUE, grep = TRUE)
downViewport(panelvp)

# add red lines.
grid.segments(unit(d$x, "npc"), unit(d$y, "npc"), unit(d$x.orig, "npc"), unit(d$y.orig, "npc"), gp = gpar(col = "red"))

image

@slowkow
Copy link
Owner

slowkow commented Oct 24, 2020

Please consider providing code that someone else can run on their own machine.

@AlvaroMCMC
Copy link
Author

nz and nz_heigth are part of package spData, and the functions are part of the listed packages.

@slowkow
Copy link
Owner

slowkow commented Oct 24, 2020

I had to install these packages from GitHub before I could run the first chunk of code:

install.packages("spDataLarge", repos = "https://nowosad.github.io/drat/", type = "source")

devtools::install_github("yutannihilation/ggsflabel")

Could you please provide a sessionInfo() so we can see which versions of these packages you are using?

When I try to run the first chunk of code:

ggplot() +
  geom_sf(data = nz, aes(color = Name)) +
  geom_sf(data = nz_height) +
  geom_sf_text_repel(data = nz_height, aes(label = elevation), min.segment.length = 0) +
  coord_sf(datum = st_crs(nz_height)) +
  theme(
    legend.position = "none"
  )

This is what I get:

Error in if (text_box[1] <= point_pos[1] && point_pos[1] <= text_box[3] &&  : 
  missing value where TRUE/FALSE needed

The error goes away when I comment out geom_sf_text_repel().

I'm not sure where the error is coming from... maybe from ggrepel, or maybe from ggsflabel?

Here's my session info:

devtools::session_info()
> devtools::session_info()
─ Session info ────────────────────────────────────────────────────────────────────────────────────────────────────
 setting  value                       
 version  R version 4.0.2 (2020-06-22)
 os       macOS Catalina 10.15.7      
 system   x86_64, darwin17.0          
 ui       RStudio                     
 language (EN)                        
 collate  en_US.UTF-8                 
 ctype    en_US.UTF-8                 
 tz       America/New_York            
 date     2020-10-24                  

─ Packages ────────────────────────────────────────────────────────────────────────────────────────────────────────
 package      * version    date       lib source                                    
 abind          1.4-5      2016-07-21 [1] CRAN (R 4.0.2)                            
 assertthat     0.2.1      2019-03-21 [1] CRAN (R 4.0.2)                            
 backports      1.1.10     2020-09-15 [1] CRAN (R 4.0.2)                            
 base64enc      0.1-3      2015-07-28 [1] CRAN (R 4.0.2)                            
 blob           1.2.1      2020-01-20 [1] CRAN (R 4.0.2)                            
 broom          0.7.0      2020-07-09 [1] CRAN (R 4.0.2)                            
 callr          3.5.1      2020-10-13 [1] CRAN (R 4.0.2)                            
 cellranger     1.1.0      2016-07-27 [1] CRAN (R 4.0.2)                            
 class          7.3-17     2020-04-26 [1] CRAN (R 4.0.2)                            
 classInt       0.4-3      2020-04-07 [1] CRAN (R 4.0.2)                            
 cli            2.1.0      2020-10-12 [1] CRAN (R 4.0.2)                            
 codetools      0.2-16     2018-12-24 [1] CRAN (R 4.0.2)                            
 colorspace     1.4-1      2019-03-18 [1] CRAN (R 4.0.2)                            
 crayon         1.3.4      2017-09-16 [1] CRAN (R 4.0.2)                            
 crosstalk      1.1.0.1    2020-03-13 [1] CRAN (R 4.0.2)                            
 DBI            1.1.0      2019-12-15 [1] CRAN (R 4.0.2)                            
 dbplyr         1.4.4      2020-05-27 [1] CRAN (R 4.0.2)                            
 desc           1.2.0      2018-05-01 [1] CRAN (R 4.0.2)                            
 devtools       2.3.0      2020-04-10 [1] CRAN (R 4.0.2)                            
 dichromat      2.0-0      2013-01-24 [1] CRAN (R 4.0.2)                            
 digest         0.6.26     2020-10-17 [1] CRAN (R 4.0.2)                            
 dplyr        * 1.0.0      2020-05-29 [1] CRAN (R 4.0.2)                            
 e1071          1.7-4      2020-10-14 [1] CRAN (R 4.0.2)                            
 ellipsis       0.3.1      2020-05-15 [1] CRAN (R 4.0.2)                            
 fansi          0.4.1      2020-01-08 [1] CRAN (R 4.0.2)                            
 farver         2.0.3      2020-01-16 [1] CRAN (R 4.0.2)                            
 forcats      * 0.5.0      2020-03-01 [1] CRAN (R 4.0.2)                            
 fs             1.4.2      2020-06-30 [1] CRAN (R 4.0.2)                            
 generics       0.0.2      2018-11-29 [1] CRAN (R 4.0.2)                            
 ggplot2      * 3.3.2.9000 2020-07-17 [1] Github (tidyverse/ggplot2@a3019f9)        
 ggrepel      * 0.8.2      2020-03-08 [1] CRAN (R 4.0.2)                            
 ggsflabel    * 0.0.1      2020-10-24 [1] Github (yutannihilation/ggsflabel@a489481)
 glue           1.4.2      2020-08-27 [1] CRAN (R 4.0.2)                            
 gtable         0.3.0      2019-03-25 [1] CRAN (R 4.0.2)                            
 haven          2.3.1      2020-06-01 [1] CRAN (R 4.0.2)                            
 hms            0.5.3      2020-01-08 [1] CRAN (R 4.0.2)                            
 htmltools      0.5.0      2020-06-16 [1] CRAN (R 4.0.2)                            
 htmlwidgets    1.5.1      2019-10-08 [1] CRAN (R 4.0.2)                            
 httr           1.4.1      2019-08-05 [1] CRAN (R 4.0.1)                            
 jsonlite       1.7.0      2020-06-25 [1] CRAN (R 4.0.2)                            
 KernSmooth     2.23-17    2020-04-26 [1] CRAN (R 4.0.2)                            
 knitr        * 1.29       2020-06-23 [1] CRAN (R 4.0.2)                            
 lattice        0.20-41    2020-04-02 [1] CRAN (R 4.0.2)                            
 leafem         0.1.3      2020-07-26 [1] CRAN (R 4.0.2)                            
 leaflet        2.0.3      2019-11-16 [1] CRAN (R 4.0.2)                            
 leafsync       0.1.0      2019-03-05 [1] CRAN (R 4.0.2)                            
 lifecycle      0.2.0      2020-03-06 [1] CRAN (R 4.0.2)                            
 lubridate      1.7.9      2020-06-08 [1] CRAN (R 4.0.2)                            
 lwgeom         0.2-5      2020-06-12 [1] CRAN (R 4.0.2)                            
 magrittr       1.5.0.9000 2020-09-11 [1] Github (tidyverse/magrittr@15f6f07)       
 memoise        1.1.0.9000 2020-07-17 [1] Github (r-lib/memoise@4aefd9f)            
 modelr         0.1.8      2020-05-19 [1] CRAN (R 4.0.2)                            
 munsell        0.5.0      2018-06-12 [1] CRAN (R 4.0.2)                            
 packrat        0.5.0      2018-11-14 [1] CRAN (R 4.0.2)                            
 pillar         1.4.6      2020-07-10 [1] CRAN (R 4.0.2)                            
 pkgbuild       1.1.0      2020-07-13 [1] CRAN (R 4.0.2)                            
 pkgconfig      2.0.3      2019-09-22 [1] CRAN (R 4.0.2)                            
 pkgload        1.1.0      2020-05-29 [1] CRAN (R 4.0.2)                            
 png            0.1-7      2013-12-03 [1] CRAN (R 4.0.2)                            
 prettyunits    1.1.1      2020-01-24 [1] CRAN (R 4.0.2)                            
 processx       3.4.4      2020-09-03 [1] CRAN (R 4.0.2)                            
 ps             1.4.0      2020-10-07 [1] CRAN (R 4.0.2)                            
 purrr        * 0.3.4      2020-04-17 [1] CRAN (R 4.0.2)                            
 R6             2.4.1      2019-11-12 [1] CRAN (R 4.0.2)                            
 raster       * 3.3-13     2020-07-17 [1] CRAN (R 4.0.2)                            
 RColorBrewer   1.1-2      2014-12-07 [1] CRAN (R 4.0.2)                            
 Rcpp           1.0.5.1    2020-07-17 [1] Github (RcppCore/Rcpp@85f6b27)            
 readr        * 1.3.1      2018-12-21 [1] CRAN (R 4.0.2)                            
 readxl         1.3.1      2019-03-13 [1] CRAN (R 4.0.2)                            
 remotes        2.1.1      2020-02-15 [1] CRAN (R 4.0.2)                            
 reprex         0.3.0      2019-05-16 [1] CRAN (R 4.0.2)                            
 rlang          0.4.8      2020-10-08 [1] CRAN (R 4.0.2)                            
 rprojroot      1.3-2      2018-01-03 [1] CRAN (R 4.0.2)                            
 rstudioapi     0.11       2020-02-07 [1] CRAN (R 4.0.2)                            
 rvest          0.3.5      2019-11-08 [1] CRAN (R 4.0.1)                            
 scales         1.1.1      2020-05-11 [1] CRAN (R 4.0.2)                            
 sessioninfo    1.1.1      2018-11-05 [1] CRAN (R 4.0.2)                            
 sf           * 0.9-6      2020-09-13 [1] CRAN (R 4.0.2)                            
 sp           * 1.4-2      2020-05-20 [1] CRAN (R 4.0.2)                            
 spData       * 0.3.8      2020-07-03 [1] CRAN (R 4.0.2)                            
 spDataLarge  * 0.5.0      2020-10-24 [1] local                                     
 stars          0.4-3      2020-07-08 [1] CRAN (R 4.0.2)                            
 stringi        1.4.6      2020-02-17 [1] CRAN (R 4.0.2)                            
 stringr      * 1.4.0      2019-02-10 [1] CRAN (R 4.0.2)                            
 testthat       2.3.2      2020-03-02 [1] CRAN (R 4.0.2)                            
 tibble       * 3.0.4      2020-10-12 [1] CRAN (R 4.0.2)                            
 tidyr        * 1.1.0      2020-05-20 [1] CRAN (R 4.0.2)                            
 tidyselect     1.1.0      2020-05-11 [1] CRAN (R 4.0.2)                            
 tidyverse    * 1.3.0      2019-11-21 [1] CRAN (R 4.0.2)                            
 tmap         * 3.2        2020-09-15 [1] CRAN (R 4.0.2)                            
 tmaptools    * 3.1        2020-07-01 [1] CRAN (R 4.0.2)                            
 units          0.6-7      2020-06-13 [1] CRAN (R 4.0.2)                            
 usethis        1.6.1      2020-04-29 [1] CRAN (R 4.0.2)                            
 vctrs          0.3.4      2020-08-29 [1] CRAN (R 4.0.2)                            
 viridisLite    0.3.0      2018-02-01 [1] CRAN (R 4.0.1)                            
 withr          2.3.0      2020-09-22 [1] CRAN (R 4.0.2)                            
 xfun           0.15       2020-06-21 [1] CRAN (R 4.0.2)                            
 XML            3.99-0.4   2020-07-05 [1] CRAN (R 4.0.2)                            
 xml2           1.3.2      2020-04-23 [1] CRAN (R 4.0.2)                            

[1] /Library/Frameworks/R.framework/Versions/4.0/Resources/library

@AlvaroMCMC
Copy link
Author

Here's my session info:

- Session info ------------------------------------------------------------------------------------------------------------------------
 setting  value                       
 version  R version 4.0.2 (2020-06-22)
 os       Windows 10 x64              
 system   x86_64, mingw32             
 ui       RStudio                     
 language (EN)                        
 collate  Spanish_Spain.1252          
 ctype    Spanish_Spain.1252          
 tz       America/Bogota              
 date     2020-10-24                  

- Packages ----------------------------------------------------------------------------------------------------------------------------
 ! package      * version  date       lib source                                    
   abind          1.4-5    2016-07-21 [1] CRAN (R 4.0.0)                            
   assertthat     0.2.1    2019-03-21 [1] CRAN (R 4.0.2)                            
   backports      1.1.10   2020-09-15 [1] CRAN (R 4.0.2)                            
   base64enc      0.1-3    2015-07-28 [1] CRAN (R 4.0.0)                            
   blob           1.2.1    2020-01-20 [1] CRAN (R 4.0.2)                            
   broom          0.7.0    2020-07-09 [1] CRAN (R 4.0.2)                            
   callr          3.5.1    2020-10-13 [1] CRAN (R 4.0.3)                            
   cellranger     1.1.0    2016-07-27 [1] CRAN (R 4.0.2)                            
   class          7.3-17   2020-04-26 [2] CRAN (R 4.0.2)                            
   classInt       0.4-3    2020-04-07 [1] CRAN (R 4.0.2)                            
   cli            2.1.0    2020-10-12 [1] CRAN (R 4.0.3)                            
   codetools      0.2-16   2018-12-24 [2] CRAN (R 4.0.2)                            
   colorspace     1.4-1    2019-03-18 [1] CRAN (R 4.0.2)                            
   crayon         1.3.4    2017-09-16 [1] CRAN (R 4.0.2)                            
   crosstalk      1.1.0.1  2020-03-13 [1] CRAN (R 4.0.2)                            
   crul           1.0.0    2020-07-30 [1] CRAN (R 4.0.2)                            
   curl           4.3      2019-12-02 [1] CRAN (R 4.0.2)                            
   DBI            1.1.0    2019-12-15 [1] CRAN (R 4.0.2)                            
   dbplyr         1.4.4    2020-05-27 [1] CRAN (R 4.0.2)                            
   desc           1.2.0    2018-05-01 [1] CRAN (R 4.0.2)                            
   devtools       2.3.2    2020-09-18 [1] CRAN (R 4.0.2)                            
   dichromat      2.0-0    2013-01-24 [1] CRAN (R 4.0.0)                            
   digest         0.6.25   2020-02-23 [1] CRAN (R 4.0.2)                            
   dplyr        * 1.0.2    2020-08-18 [1] CRAN (R 4.0.2)                            
   e1071          1.7-3    2019-11-26 [1] CRAN (R 4.0.2)                            
   ellipsis       0.3.1    2020-05-15 [1] CRAN (R 4.0.2)                            
   evaluate       0.14     2019-05-28 [1] CRAN (R 4.0.2)                            
   fansi          0.4.1    2020-01-08 [1] CRAN (R 4.0.2)                            
   farver         2.0.3    2020-01-16 [1] CRAN (R 4.0.2)                            
   fasterize      1.0.3    2020-07-27 [1] CRAN (R 4.0.2)                            
   forcats      * 0.5.0    2020-03-01 [1] CRAN (R 4.0.2)                            
   foreach        1.5.0    2020-03-30 [1] CRAN (R 4.0.2)                            
   fs             1.5.0    2020-07-31 [1] CRAN (R 4.0.2)                            
   gdalUtils      2.0.3.2  2020-02-13 [1] CRAN (R 4.0.2)                            
   generics       0.0.2    2018-11-29 [1] CRAN (R 4.0.2)                            
   geojsonlint    0.4.0    2020-02-13 [1] CRAN (R 4.0.2)                            
   geosphere      1.5-10   2019-05-26 [1] CRAN (R 4.0.2)                            
   ggcorrplot   * 0.1.3    2019-05-19 [1] CRAN (R 4.0.2)                            
   ggplot2      * 3.3.2    2020-06-19 [1] CRAN (R 4.0.2)                            
   ggrepel      * 0.8.2    2020-03-08 [1] CRAN (R 4.0.3)                            
   ggsflabel    * 0.0.1    2020-10-21 [1] Github (yutannihilation/ggsflabel@a489481)
   glue           1.4.2    2020-08-27 [1] CRAN (R 4.0.2)                            
   gridExtra      2.3      2017-09-09 [1] CRAN (R 4.0.2)                            
   gtable         0.3.0    2019-03-25 [1] CRAN (R 4.0.2)                            
   haven          2.3.1    2020-06-01 [1] CRAN (R 4.0.2)                            
   hexbin         1.28.1   2020-02-03 [1] CRAN (R 4.0.2)                            
   hms            0.5.3    2020-01-08 [1] CRAN (R 4.0.2)                            
   htmltools      0.5.0    2020-06-16 [1] CRAN (R 4.0.2)                            
   htmlwidgets    1.5.1    2019-10-08 [1] CRAN (R 4.0.2)                            
   httpcode       0.3.0    2020-04-10 [1] CRAN (R 4.0.2)                            
   httr           1.4.2    2020-07-20 [1] CRAN (R 4.0.2)                            
   inline         0.3.16   2020-09-06 [1] CRAN (R 4.0.2)                            
   iterators      1.0.12   2019-07-26 [1] CRAN (R 4.0.2)                            
   janitor      * 2.0.1    2020-04-12 [1] CRAN (R 4.0.2)                            
   jpeg           0.1-8.1  2019-10-24 [1] CRAN (R 4.0.0)                            
   jsonlite       1.7.1    2020-09-07 [1] CRAN (R 4.0.2)                            
   jsonvalidate   1.1.0    2019-06-25 [1] CRAN (R 4.0.2)                            
   KernSmooth     2.23-17  2020-04-26 [2] CRAN (R 4.0.2)                            
   knitr        * 1.30     2020-09-22 [1] CRAN (R 4.0.2)                            
   labeling       0.3      2014-08-23 [1] CRAN (R 4.0.0)                            
   lattice        0.20-41  2020-04-02 [2] CRAN (R 4.0.2)                            
   latticeExtra   0.6-29   2019-12-19 [1] CRAN (R 4.0.2)                            
   leafem         0.1.3    2020-07-26 [1] CRAN (R 4.0.2)                            
   leaflet        2.0.3    2019-11-16 [1] CRAN (R 4.0.2)                            
   leafsync       0.1.0    2019-03-05 [1] CRAN (R 4.0.2)                            
   lifecycle      0.2.0    2020-03-06 [1] CRAN (R 4.0.2)                            
   loo            2.3.1    2020-07-14 [1] CRAN (R 4.0.2)                            
   lubridate    * 1.7.9    2020-06-08 [1] CRAN (R 4.0.2)                            
   lwgeom         0.2-5    2020-06-12 [1] CRAN (R 4.0.2)                            
   magrittr     * 1.5      2014-11-22 [1] CRAN (R 4.0.2)                            
   mapview        2.9.0    2020-08-11 [1] CRAN (R 4.0.2)                            
   matrixStats    0.56.0   2020-03-13 [1] CRAN (R 4.0.2)                            
   memoise        1.1.0    2017-04-21 [1] CRAN (R 4.0.2)                            
   modelr         0.1.8    2020-05-19 [1] CRAN (R 4.0.2)                            
   munsell        0.5.0    2018-06-12 [1] CRAN (R 4.0.2)                            
   naniar       * 0.6.0    2020-09-02 [1] CRAN (R 4.0.2)                            
   pillar         1.4.6    2020-07-10 [1] CRAN (R 4.0.2)                            
   pkgbuild       1.1.0    2020-07-13 [1] CRAN (R 4.0.2)                            
   pkgconfig      2.0.3    2019-09-22 [1] CRAN (R 4.0.2)                            
   pkgload        1.1.0    2020-05-29 [1] CRAN (R 4.0.2)                            
   plyr           1.8.6    2020-03-03 [1] CRAN (R 4.0.2)                            
   png            0.1-7    2013-12-03 [1] CRAN (R 4.0.0)                            
   prettyunits    1.1.1    2020-01-24 [1] CRAN (R 4.0.2)                            
   processx       3.4.4    2020-09-03 [1] CRAN (R 4.0.2)                            
   ps             1.4.0    2020-10-07 [1] CRAN (R 4.0.2)                            
   purrr        * 0.3.4    2020-04-17 [1] CRAN (R 4.0.2)                            
   R.methodsS3    1.8.1    2020-08-26 [1] CRAN (R 4.0.2)                            
   R.oo           1.24.0   2020-08-26 [1] CRAN (R 4.0.2)                            
   R.utils        2.10.1   2020-08-26 [1] CRAN (R 4.0.2)                            
   R6             2.4.1    2019-11-12 [1] CRAN (R 4.0.2)                            
   raster       * 3.3-13   2020-07-17 [1] CRAN (R 4.0.2)                            
   rasterVis      0.48     2020-06-16 [1] CRAN (R 4.0.2)                            
   RColorBrewer   1.1-2    2014-12-07 [1] CRAN (R 4.0.0)                            
   Rcpp           1.0.5    2020-07-06 [1] CRAN (R 4.0.2)                            
 D RcppParallel   5.0.2    2020-06-24 [1] CRAN (R 4.0.2)                            
   readr        * 1.3.1    2018-12-21 [1] CRAN (R 4.0.2)                            
   readxl       * 1.3.1    2019-03-13 [1] CRAN (R 4.0.2)                            
   remotes        2.2.0    2020-07-21 [1] CRAN (R 4.0.2)                            
   reprex         0.3.0    2019-05-16 [1] CRAN (R 4.0.2)                            
   reshape2     * 1.4.4    2020-04-09 [1] CRAN (R 4.0.2)                            
   rgdal          1.5-16   2020-08-07 [1] CRAN (R 4.0.2)                            
   rlang          0.4.7    2020-07-09 [1] CRAN (R 4.0.2)                            
   rmapshaper     0.4.4    2020-04-01 [1] CRAN (R 4.0.2)                            
   rmarkdown      2.4      2020-09-30 [1] CRAN (R 4.0.3)                            
   rprojroot      1.3-2    2018-01-03 [1] CRAN (R 4.0.2)                            
   rstan          2.21.2   2020-07-27 [1] CRAN (R 4.0.2)                            
   rstudioapi     0.11     2020-02-07 [1] CRAN (R 4.0.2)                            
   rvest          0.3.6    2020-07-25 [1] CRAN (R 4.0.2)                            
   satellite      1.0.2    2019-12-09 [1] CRAN (R 4.0.2)                            
   scales         1.1.1    2020-05-11 [1] CRAN (R 4.0.2)                            
   sessioninfo    1.1.1    2018-11-05 [1] CRAN (R 4.0.2)                            
   sf           * 0.9-7    2020-10-10 [1] Github (r-spatial/sf@5caaca7)             
   snakecase      0.11.0   2019-05-25 [1] CRAN (R 4.0.2)                            
   sp           * 1.4-4    2020-10-07 [1] CRAN (R 4.0.2)                            
   spData       * 0.3.8    2020-07-03 [1] CRAN (R 4.0.2)                            
   spDataLarge  * 0.5.0    2020-10-11 [1] Github (Nowosad/spDataLarge@4c5795f)      
   StanHeaders    2.21.0-6 2020-08-16 [1] CRAN (R 4.0.2)                            
   stars          0.4-3    2020-07-08 [1] CRAN (R 4.0.2)                            
   stringi        1.5.3    2020-09-09 [1] CRAN (R 4.0.2)                            
   stringr      * 1.4.0    2019-02-10 [1] CRAN (R 4.0.2)                            
   testthat       2.3.2    2020-03-02 [1] CRAN (R 4.0.2)                            
   tibble       * 3.0.4    2020-10-12 [1] CRAN (R 4.0.3)                            
   tidyr        * 1.1.2    2020-08-27 [1] CRAN (R 4.0.2)                            
   tidyselect     1.1.0    2020-05-11 [1] CRAN (R 4.0.2)                            
   tidyverse    * 1.3.0    2019-11-21 [1] CRAN (R 4.0.2)                            
   tmap         * 3.2      2020-09-15 [1] CRAN (R 4.0.2)                            
   tmaptools    * 3.1      2020-07-01 [1] CRAN (R 4.0.2)                            
   units          0.6-7    2020-06-13 [1] CRAN (R 4.0.2)                            
   usethis        1.6.3    2020-09-17 [1] CRAN (R 4.0.2)                            
   V8             3.2.0    2020-06-19 [1] CRAN (R 4.0.2)                            
   vctrs          0.3.4    2020-08-29 [1] CRAN (R 4.0.2)                            
   viridisLite    0.3.0    2018-02-01 [1] CRAN (R 4.0.2)                            
   visdat         0.5.3    2019-02-15 [1] CRAN (R 4.0.2)                            
   webshot        0.5.2    2019-11-22 [1] CRAN (R 4.0.2)                            
   withr          2.3.0    2020-09-22 [1] CRAN (R 4.0.2)                            
   xfun           0.17     2020-09-09 [1] CRAN (R 4.0.2)                            
   XML            3.99-0.5 2020-07-23 [1] CRAN (R 4.0.2)                            
   xml2           1.3.2    2020-04-23 [1] CRAN (R 4.0.2)                            
   yaml           2.2.1    2020-02-01 [1] CRAN (R 4.0.0)                            
   zoo            1.8-8    2020-05-02 [1] CRAN (R 4.0.2)                            

[1] C:/Users/Alvaro/Documents/R/win-library/4.0
[2] C:/Program Files/R/R-4.0.2/library

 D -- DLL MD5 mismatch, broken installation.

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

No branches or pull requests

2 participants