Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

line in assign_unknown.R causing error in comlandr pull #60

Open
sgaichas opened this issue Jun 28, 2024 · 2 comments
Open

line in assign_unknown.R causing error in comlandr pull #60

sgaichas opened this issue Jun 28, 2024 · 2 comments

Comments

@sgaichas
Copy link
Member

sgaichas commented Jun 28, 2024

This line causes a mismatch error in a merge for me, because it results in names VAR1 VAR2 etc instead of the intended names.

stra.combo <- unlist(stra.combo[, ..num.stra.var])

To correct this, I added unname() to the line:

stra.combo <- unname(unlist(stra.combo[, ..num.stra.var]))

this allowed the function to proceed, so would allowget_comland_data to return the dataset

I have not yet reviewed the dataset but wanted to flag this now

@sgaichas
Copy link
Member Author

sgaichas commented Jul 2, 2024

Version of R this was running in

> version
               _                           
platform       x86_64-pc-linux-gnu         
arch           x86_64                      
os             linux-gnu                   
system         x86_64, linux-gnu           
status                                     
major          4                           
minor          3.1                         
year           2023                        
month          06                          
day            16                          
svn rev        84548                       
language       R                           
version.string R version 4.3.1 (2023-06-16)
nickname       Beagle Scouts     

@sgaichas
Copy link
Member Author

sgaichas commented Jul 2, 2024

comlandr call arguments

# my call arguments
filterByYear = 1964:2023
refYear = 2021 
refMonth = 1
aggArea = T
userAreas = epuAreas 
applyPropLand = F # Bug? This mismatches default for value but aggregate_area code sets this to F not value to F
aggGear = F
unkVar = c('MONTH', 'NEGEAR', 'EPU')
knStrata = c('HY', 'QY', 'MONTH', 'NEGEAR', 'TONCL2',
             'EPU')

# other default call arguments
useLanded = T
removeParts = T
useHerringMaine = T
useForeign = T
disagSkatesHakes = T
areaDescription = 'EPU'
propDescription = 'MeanProp'
fleetDescription = 'Fleet'
filterByArea = NA
applyPropValue = T # Bug? This default mismatches entered value but aggregate_area code sets land to F not value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant