ices-tools-prod / icesSAG

R interface to Stock Assessment Graphs database web services
http://sg.ices.dk/webservices.aspx
10 stars 7 forks source link

stockInfo() ignores StockCategory #201

Closed iagomosqueira closed 1 year ago

iagomosqueira commented 4 years ago

When stockInfo() is called with StockCategory as argument, it appears to be ignored

info <- stockInfo(StockCode="sol.27.4", AssessmentYear=2020,
  Purpose = "Advice", StockCategory=1, ContactPerson="iago.mosqueira@wur.nl")

info$StockCategory

returns NA.

It can obviously be set later

info$StockCategory <- 1

info$StockCategory
hgerritsen commented 1 year ago

This is still not resolved (icesSSAG v 1.4.0)

colinpmillar commented 1 year ago

Thanks both. I have fixed the (silly) bug. This should work now:

info <- stockInfo(
  StockCode = "sol.27.4", AssessmentYear = 2020,
  Purpose = "Advice", StockCategory = 1, ContactPerson = "iago.mosqueira@wur.nl",
  ModelType = "A", ModelName = "AartsPoos"
)

info

NOTE you have to supply ModelType and ModelName now.

Will submit to CRAN shortly

colinpmillar commented 1 year ago

submitted to CRAN - will check other bugs next. Thanks both!

iagomosqueira commented 1 year ago

Many thanks