pheno <- data.frame(fish = 1:50, type = rep(LETTERS[1:5], length.out = 50))
i <- experDesign::design(pheno[ , "type", drop = FALSE], size_subset = 250)
i <- experDesign::replicates(pheno[ , "type", drop = FALSE], size_subset = 250, controls = 5)
This might need to check if the data.frame has one column only and deal with it. (I don't understand now why it fails, but it seems like on the subsetting on categorical and numeric I should add a drop = FALSE.
How does one take a random sample of size Y with at least X elements per group? I.e sample n=250 rows from a df with fish of diff ages, with at least 5 rows per age.
This shouldn't be an error:
This might need to check if the data.frame has one column only and deal with it. (I don't understand now why it fails, but it seems like on the subsetting on categorical and numeric I should add a drop = FALSE.
From tweet: