Closed gustavdelius closed 3 years ago
I am not sure what I was thinking when I wrote the above. It must have been late at night. We can of course already select by species name. So the first line in the above post is just a complicated way of writing
species_params(params)["Cod", "biomass_observed"] <- 111
This works because the species names are also used as the rownames for the species_params data frame (and this is enforced by validSpeciesParams()
. The problem with missing autocomplete is, I am afraid, not one that can be addressed by what I was proposing above. The autocomplete is specific to the $ notation.
So improvement could only be achieved for the gear_params. The simplest would be to set the rownames of gear_params to be of the form "species, gear". Then we could write
gear_params(params)["Cod, Otter", "catchability] <- 1
I don't think this will be used very often, but there is no reason not to set rownames on gear_params, so I will add that to validGearParams()
.
Currently if one wants to change a species parameter for a particular species, say
biomass_observed
for Cod, the syntax isThere are two obvious inconveniences here:
species_params(params)$bi
It would be nicer to have the syntax
For gear params similarly instead of
we would prefer