Running examples in 'beadplexr-Ex.R' failed
The error most likely occurred in:

> ### Name: cluster_events
> ### Title: Clustering with trimming
> ### Aliases: cluster_events bp_kmeans bp_clara bp_dbscan bp_mclust
> ###   bp_density_cut
> 
> ### ** Examples
> 
> library(beadplexr)
> library(dplyr)

Attaching package: 'dplyr'

The following objects are masked from 'package:stats':

    filter, lag

The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union

> library(ggplot2)
> 
> data("lplex")
> 
> lplex[[1]] %>%
+   # Speed things up a bit by selecting one fourth of the events.
+   # Probably not something you'd usually do
+   dplyr::sample_frac(0.25) %>%
+   bp_kmeans(.parameter = c("FSC-A", "SSC-A"),
+             .column_name = "population", .trim = 0.1, .k = 2) %>%
+   ggplot() +
+   aes(x = `FSC-A`, y = `SSC-A`, colour = population) +
+   geom_point()
> 
> library(beadplexr)
> library(dplyr)
> library(ggplot2)
> 
> data("lplex")
> 
> lplex[[1]] %>%
+   # Speed things up a bit by selecting one fourth of the events.
+   # Probably not something you'd usually do
+   dplyr::sample_frac(0.25) %>%
+   bp_clara(.parameter = c("FSC-A", "SSC-A"),
+            .column_name = "population", .trim = 0.1, .k = 2) %>%
+   ggplot() +
+   aes(x = `FSC-A`, y = `SSC-A`, colour = population) +
+   geom_point()
> 
> lplex[[1]] %>%
+   # Speed things up a bit by selecting one fourth of the events.
+   # Probably not something you'd usually do
+   dplyr::sample_frac(0.25) %>%
+   bp_clara(.parameter = c("FSC-A", "SSC-A"),
+            .column_name = "population", .trim = 0, .k = 2) %>%
+   ggplot() +
+   aes(x = `FSC-A`, y = `SSC-A`, colour = population) +
+   geom_point()
> 
> ## Not run: 
> ##D library(beadplexr)
> ##D library(dplyr)
> ##D library(ggplot2)
> ##D 
> ##D data("lplex")
> ##D 
> ##D lplex[[1]] %>%
> ##D   # Speed things up a bit by selecting one fourth of the events.
> ##D   # Probably not something you'd usually do
> ##D   dplyr::sample_frac(0.25) %>%
> ##D   bp_dbscan(.parameter = c("FSC-A", "SSC-A"), .column_name = "population",
> ##D             eps = 0.2, MinPts = 50) %>%
> ##D   ggplot() +
> ##D   aes(x = `FSC-A`, y = `SSC-A`, colour = population) +
> ##D   geom_point()
> ##D 
> ##D pop1 <- lplex[[1]] %>%
> ##D   # Speed things up a bit by selecting one fourth of the events.
> ##D   # Probably not something you'd usually do
> ##D   dplyr::sample_frac(0.25) %>%
> ##D   bp_dbscan(.parameter = c("FSC-A", "SSC-A"), .column_name = "population",
> ##D     eps = 0.2, MinPts = 50) %>%
> ##D   dplyr::filter(population == "1")
> ##D 
> ##D pop1 %>%
> ##D   bp_dbscan(.parameter = c("FL6-H", "FL2-H"), .column_name = "population",
> ##D     eps = 0.2, MinPts = 50) %>%
> ##D   .$population %>% unique
> ##D 
> ##D pop1 %>%
> ##D   bp_dbscan(.parameter = c("FL6-H", "FL2-H"), .column_name = "population",
> ##D     eps = 0.2, MinPts = 50, scale = FALSE) %>%
> ##D   .$population %>% unique
> ## End(Not run)
> library(beadplexr)
> library(magrittr)
> library(ggplot2)
> 
> data("lplex")
> 
> lplex[[1]] %>%
+   bp_mclust(.parameter = c("FSC-A", "SSC-A"),
+            .column_name = "population", .trim = 0, .k = 2) %>%
+   ggplot() +
+   aes(x = `FSC-A`, y = `SSC-A`, colour = population) +
+   geom_point()
> library(beadplexr)
> library(magrittr)
> library(ggplot2)
> 
> data("lplex")
> 
> lplex[[1]] %>%
+   bp_density_cut(.parameter = c("FSC-A"),
+            .column_name = "population", .trim = 0, .k = 2) %>%
+   ggplot() +
+   aes(x = `FSC-A`, y = `SSC-A`, colour = population) +
+   geom_point()
Error in grid.newpage() : 
  'R_Calloc' could not allocate memory (1147468 of 1 bytes)
Calls: <Anonymous> -> print.ggplot -> grid.newpage
Execution halted
Error: 'R_Calloc' could not allocate memory (1147468 of 1 bytes)
Fatal error: error during cleanup