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

> ### Name: w_reproductive_value
> ### Title: Reproductive value
> ### Aliases: w_reproductive_value
> 
> ### ** Examples
> 
> 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(magrittr)
> # Pedigree used in Hunter et al. (2019)
> id <- c("A1", "A2", "A3", "A4", "A5", "A6",
+         "B1", "B2", "B3", "B4",
+         "C1", "C2", "C3", "C4")
> dam <- c("0", "0", "0", "0", "0", "0",
+          "A2", "A2", "A2", "A4",
+          "B2", "B2", "A4", "A6")
> sire <- c("0", "0", "0", "0", "0", "0",
+           "A1", "A1", "A1", "A5",
+           "B1", "B3", "B3", "A5")
> t <- c(0, 0, 0, 0, 0, 0,
+        1, 1, 1, 1,
+        2, 2, 2, 2)
> ped <- tibble::tibble(id, dam, sire, t)
> ped <- purgeR::ped_rename(ped, keep_names = TRUE) %>%
+  dplyr::mutate(reference = ifelse(t == 1, TRUE, FALSE))
> purgeR::w_reproductive_value(ped, reference = "reference", name_to = "R")
   id dam sire t names reference          R
1   1   0    0 0    A1     FALSE 0.00000000
2   2   0    0 0    A2     FALSE 0.00000000
3   3   0    0 0    A3     FALSE 0.00000000
4   4   0    0 0    A4     FALSE 0.00000000
5   5   0    0 0    A5     FALSE 0.00000000
6   6   0    0 0    A6     FALSE 0.00000000
7   7   2    1 1    B1      TRUE 0.11538462
8   8   2    1 1    B2      TRUE 0.15384615
9   9   2    1 1    B3      TRUE 0.15384615
10 10   4    5 1    B4      TRUE 0.07692308
11 11   8    7 2    C1     FALSE 0.00000000
12 12   8    9 2    C2     FALSE 0.00000000
13 13   4    9 2    C3     FALSE 0.00000000
14 14   6    5 2    C4     FALSE 0.00000000
> 
> 
> 
> ### * <FOOTER>
> ###
> cleanEx()

detaching 'package:magrittr', 'package:dplyr'

> options(digits = 7L)
> base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
Time elapsed:  3.96 0.31 4.3 NA NA 
> grDevices::dev.off()
null device 
          1 
> ###
> ### Local variables: ***
> ### mode: outline-minor ***
> ### outline-regexp: "\\(> \\)?### [*]+" ***
> ### End: ***
> quit('no')