Open MaC-Perez opened 1 year ago
Can you add the sim_data
object to the repo? I don't see it anywhere.
@gavinfay I already added the sim_data.rds object
sim_data
is a list of list objects. The map()
functions are a good way to access elements (also pluck, etc.)
Say you want to get a dataframe of the observedCatch
objects.
purrr::map_dfr(sim_data,"observedCatch",.id = "isim")
This pulls the catch tables and puts them in a new data frame, with an additional column isim
that is an index for which of the elements of sim_data
the rows correspond to.
Hi @gavinfay, my simulations are contained in a new matrix (data list) called sim_data. I used to call my data using one line of code for each sim (like here https://github.com/MaC-Perez/Hydra-self-testing/blob/948a34c22575c0d115edead11d9e8160b600f777/hydra_sim.R#L215)
but now I have one data list object with 100 data sets inside and X variables inside of each data set. So I dont know how to read the 100 sims and select one variable to make the plots.