FishNetMigration / creesysr

Other
2 stars 0 forks source link

11 parse strata #12

Closed HoldenJe closed 11 months ago

HoldenJe commented 1 year ago

Adds a parse_STRAT function and tests.

library(creesysr)
dummydf <- data.frame(STRAT = c("01_13_01_02", "01_11_02_01", "03_22_04_01"))
parse_STRAT(dummydf)
#>         STRAT SSN DTP PRD SPACE MODE
#> 1 01_13_01_02  01   1   3    01   02
#> 2 01_11_02_01  01   1   1    02   01
#> 3 03_22_04_01  03   2   2    04   01

Closes Issue #11

HoldenJe commented 1 year ago

@victoriadancoMNRF - I'm requesting a review of this function from you.

Steps:

  1. Switch to the 11-parse_strata branch.
  2. Install the package locally again from that branch.
  3. Switch to one of you other working projects and test the function (use library(creesysr) when in your new project) on various tables existing tables to test whether the function is working properly.
  4. How should 01++++_++ values be handled?
victoriadancoMNRF commented 1 year ago

image looks good

ArthurBonsall commented 1 year ago

We will likely want this function to accept a field called 'STRATUM' as well as 'STRAT'. This is the standard for GLIS, but also seems to be the standard for UGLMU creels. I reached out to Rachel H. and their Sport Creel Master database uses 'STRATUM'.