Closed slucey closed 2 years ago
@slucey I can't get the package to build from your branch.
For example the get_discard_data.r has library statements and a call to get_observer_data
OK...I must have missed some files.
@andybeet see if that works now
@slucey Almost.
assign_area.R
and calc_DK.R
are inheriting parameter values from strat_prep
which is a function survdat
. Do we just need to hard code the @param declarations?
That will be something that I will fix. I copied some stuff over from survdat
and obviously didn't change the @param
designations.
a <- comlandr::comland(channel, use.existing = "n",endyear=1970)
Pulling landings data from database. This could take a while (> 1 hour) ...
Error in if (substr(tables[itab], 1, 3) == "WOL") { :
missing value where TRUE/FALSE needed
@andybeet The comland
function is deprecated. Use the get_comland_data
function instead. After everything is merged I'll go through a remove unnecessary functions.
@andybeet I was just running a quick test on my end and realize that I don't have get_foreign
on my branch. So you need to set that to F when running get_comland_data
.
ah ok.
a <- comlandr::get_comland_data(channel,useForeign = F)
Error in if (any(filterByYear < 1964)) stop("Landings data start in 1964") :
missing value where TRUE/FALSE needed
I think maybe the default arguments for filterByYear
, filterByArea
, (maybe others) should either have a default value, or the code should deal with NA's. Maybe the former is better?
The default value is NA so you don't need to specify a range. I'll look into why that error is still occurring.
So using useForeign = F
i can run the code. All seems ok. You are right that there are a couple of warning messages relating to NAs being introduced by coercion. I need to figure out the get_foregin_data
function to be able to take the arguments filterByYear
, and filterByArea
. Will add as an issue
Here's my overhaul of
comlandr
. We may need to resolve a few merge conflicts.