Closed
Description
Summary
The following code example crashes R, without issuing any error message. Crashes both at the R GUI and in RStudio. This example fails consistently on my laptop. In other cases, with my spectral data, the crashes seem to depend on the state of the operating system or something else that gets reset during rebooting. I run this on a recent model laptop with 16 GB RAM and an AMD Ryzen 7 Pro 3700U processor.
'ggrepel' installed locally from source.
Minimal code example
Here is the minimum amount of code needed to demonstrate the issue:
library(ggrepel)
library(ggplot2)
set.seed(42)
cars <- mtcars
cars$car <- rownames(mtcars)
dat3 <- rbind(
data.frame(
wt = rnorm(n = 10000, mean = 3),
mpg = rnorm(n = 10000, mean = 19),
car = ""
),
cars[,c("wt", "mpg", "car")]
)
ggplot(dat3, aes(wt, mpg, label = car)) +
geom_point(data = dat3[dat3$car == "",], color = "grey50") +
geom_text_repel(box.padding = 0.5, max.overlaps = Inf) +
geom_point(data = dat3[dat3$car != "",], color = "red")
Here is an image of the output produced by the code:
No output produced.
Suggestions
I do not have a proposal at this time.
Version information
Here is the output from sessionInfo()
in my R session:
R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19041)
Matrix products: default
locale:
[1] LC_COLLATE=English_Finland.1252 LC_CTYPE=English_Finland.1252
[3] LC_MONETARY=English_Finland.1252 LC_NUMERIC=C
[5] LC_TIME=English_Finland.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] ggrepel_0.9.0.9999 ggplot2_3.3.3
loaded via a namespace (and not attached):
[1] Rcpp_1.0.5 rstudioapi_0.13 knitr_1.30 magrittr_2.0.1 tidyselect_1.1.0
[6] munsell_0.5.0 colorspace_2.0-0 R6_2.5.0 rlang_0.4.10 dplyr_1.0.2
[11] tools_4.0.3 parallel_4.0.3 grid_4.0.3 gtable_0.3.0 xfun_0.19
[16] withr_2.3.0 htmltools_0.5.0 ellipsis_0.3.1 yaml_2.2.1 digest_0.6.27
[21] tibble_3.0.4 lifecycle_0.2.0 crayon_1.3.4 gridExtra_2.3 purrr_0.3.4
[26] vctrs_0.3.6 glue_1.4.2 evaluate_0.14 rmarkdown_2.6 compiler_4.0.3
[31] pillar_1.4.7 generics_0.1.0 scales_1.1.1 pkgconfig_2.0.3