ped = data.frame(self = 3:11, dad = 1, mum = 2)
coord = expand.grid(x = 1:3, y = 1:3)
vi <- diag(1, 2)
dat = data.frame(z = rnorm(9), coord, ped)
## This one works ok and returns a list with
# $pec
# $pec$present
# [1] FALSE
#
# $pec$var.ini
# [1] 1
breedR::check_genetic(model = 'competition',
pedigree = ped,
coordinates = coord,
id = 'self',
data = dat)
## When we specify initial variances it asks for the initial
## value of the pec variance, even if pec = FALSE by default
breedR::check_genetic(model = 'competition',
pedigree = ped,
coordinates = coord,
id = 'self',
var.ini = vi,
data = dat)
# Error in breedR::check_genetic(model = "competition", pedigree = ped, :
# var.ini must be specified for pec as well, in the competition specification.
# e.g. pec = list(present = TRUE, var.ini = 1)
The expected behaviour would be to return pec = list(present = FALSE) in both cases.
Here is a MRE:
The expected behaviour would be to return
pec = list(present = FALSE)
in both cases.Thanks to S. Lecourieux for reporting.