Create `plot_daisie_data`
richelbilderbeek opened this issue · comments
Currently, we can plot the mainland and the island, i.e. data types mainland
and island
. However, the daisie_data
cannot be plotted yet, which would be useful to verify the format_to_daisie_data
function works nice.
It is easy to get a daisy_data
from a daisie_mainland_data
:
daisie_mainland_data <- sim_island_with_mainland(
total_time = 1,
m = 10,
island_pars = c(1, 1, 10, 0.1, 1),
mainland_ex = 1,
mainland_sample_prob = 1,
mainland_sample_type = "undiscovered",
replicates = 10,
verbose = FALSE
)
ideal_daisie_data <- daisie_mainland_data$ideal_multi_daisie_data[[1]] # a daisie_data
empirical_daisie_data <- daisie_mainland_data$empirical_multi_daisie_data[[1]] # a daisie_data
Plot each of these using plot_daisie_data
@richelbilderbeek given the function format_to_data_data
is not longer in the package, that we stop development of plot_daisie_data. What do you think?
[edit: removed my confused comment]
Hmmm, I am getting confused here. I understood the structure called daisie_data
contains the info to make nice plots of the islands, for both the observed and ideal data.
What is the name of data structure I can use to plot the history of the island histories, for the observed and ideal data?
I thought the new plan was:
island_tbl
toideal_island_tbl
andempirical_island_tbl
ideal_island_tbl
is plotted byplot_ideal_island_tbl
empirical_island_tbl
is plotted byplot_empirical_island_tbl
Would be the only plotting functions for the plotting the island?
Hi @joshwlambert, thanks for clearing that one up!
I still would enjoy plotting the DAISIE data: it allows one to verify that the conversion from DAISIEmainland data to DAISIE has gone
However, I will focus on plotting the ideal_island_tbl
and empirical_island_tbl
first (i.e. #51)
This is something for after the next release. I will ruthlessly close it for now.
Nope, it appears this is what #59 actually depends on; to be able to plot a daisie_data
, so I reopen this one, as I am now working on it :-)
An example when the two data sets differ:
test_that("much branching", {
set.seed(
1018,
kind = "Mersenne-Twister",
normal.kind = "Inversion",
sample.kind = "Rejection"
)
daisie_mainland_data <- sim_island_with_mainland(
total_time = 1,
m = 10,
island_pars = c(1, 1, 10, 0.1, 1),
mainland_ex = 1,
mainland_sample_prob = 1,
mainland_sample_type = "complete",
replicates = 1,
verbose = FALSE
)
plot_daisie_mainland_data(daisie_mainland_data, replicate_index = 1)
})