NewGraphEnvironment / fpr

Fish Passage Reporting functions for British Columbia
http://www.newgraphenvironment.com/fpr/
Other
2 stars 2 forks source link

`fpr_table_fish_density(scroll = gitbook_on)` to enable scrolling in gitbook when table is long throws error because formal argument "scroll" matched by multiple actual arguments #30

Open Mateo9569 opened 1 year ago

Mateo9569 commented 1 year ago

fpr_table_fish_density function (dat = fish_abund, sit = my_site, ...) { dat %>% dplyr::filter(site == sit) %>% dplyr::select(local_name, species_code, life_stage, catch, density_100m2, nfc_pass) %>% fpr_kable(caption_text = paste0("Fish sampling density results summary for ", sit, "."), footnote_text = "nfc_pass FALSE means fish were captured in final pass indicating more fish of this species/lifestage may have remained in site.\n Mark-recaptured required to reduce uncertainties.", scroll = F, ...) }

Change scroll parameter to scroll = gitbook_on

NewGraphEnvironment commented 1 year ago

we only want the scroll = gitbook_on when the table is long. Might be a bit of a rabbit hole to try to deal without changeing all the old reports so won't be surprised if we just need to make another function or leave fpr_table_fish_density tables long. i don't think passing scroll = gitbook_on to fpr_kable through other table functions is an issue .

NewGraphEnvironment commented 1 year ago

for context - this error was

error when building the latest report that says the following:

Error in fpr_kable(., caption_text = paste0("Fish sampling density results summary for ",  :  formal argument "scroll" matched by multiple actual arguments

When I removed the scroll = gitbook_on argument the build worked.