Closed richelbilderbeek closed 5 years ago
We need to rescale something by a factor of k. I think we have to options for this:
1) Change the parameters:
I suggest we start with something like k = 10 / 7 and we simulate to obtain the median amount of tips. The we'll adjust for higher or lower k, if necessary.
Will write a test to help us guide in our decisions.
I have written a test for the function's implementation:
test_that("use", {
# Issue 278, Issue #278: 'calc_n_taxas' is only a stub
# Create a testing parameter set
mbd_paramses <- create_test_mbd_paramses()
# Per mbd_params, get the number of taxa of the true tree,
# e.g. by simulating it in the same way razzo already does
n_taxas <- calc_n_taxas(mbd_paramses)
# n_taxa is a simple numerical list
expect_true(is.numeric(n_taxas))
# with as much elements as the razzo_paramses
expect_equal(length(mbd_paramses), length(n_taxas))
})
@Giappo: I assign you this Issue, as I think you would enjoy it. No worries about the time: I will re-assign to myself when really needing this :+1:
Will do. What if make calc_n_taxas(mbd_paramses) in such a way we get more info than just the average number of taxa? Something like median+stdev or the entire distribution even
calc_n_taxas
gives the number of taxa per parameter set, e.g { 1,2,3,4,5,6 }, exactly the raw material we can calculate the mean, median, etc. of.
Function is available on my branch.
Cool, well done :+1:
From @rsetienne: