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

Ideas for classes of objects saved in package #16

Open
4 of 5 tasks
andrew-edwards opened this issue May 2, 2023 · 5 comments
Open
4 of 5 tasks

Ideas for classes of objects saved in package #16

andrew-edwards opened this issue May 2, 2023 · 5 comments
Assignees

Comments

@andrew-edwards
Copy link
Member

andrew-edwards commented May 2, 2023

I was thinking of the classes just being pacea_t for a time series, pacea_s for spatial, and pacea_st for spatiotemporal, and then having functions like plot.pacea_t() to plot an object in the correct style.
Currently implement (not fully working) for climate indices, so that
plot(oni) does a sensible plot.

Currently implementing estimated annual recruitment and biomass from hake assessment, for which different types of plot are needed. So now thinking to have classes:

  • pacea_index - climate and oceanographic indices
  • pacea_biomass - estimated biomass
  • pacea_recruitment - estimated recruitment
  • pacea_s - spatial (to add to a map)
  • pacea_st - spatiotemporal, such as ROMS output, but may want to be more specific.

The current plot.pacea_t() is getting a bit big with different switches depending on what's in the object, so makes sense just to add more classes with sensible default plotting options.

@andrew-edwards andrew-edwards self-assigned this May 2, 2023
@andrew-edwards
Copy link
Member Author

Looks like classes can be documented like functions:
https://adv-r.hadley.nz/s3.html#s3-constructor (a few links on from https://r-pkgs.org/man.html )

@andrew-edwards
Copy link
Member Author

We're ending up with more classes. So go through them and just briefly document them as per above, to help for adding future data objects (so we'll know if we can just call them an existing class).

@andrew-edwards andrew-edwards added the for Version 1.0.0.0 Needs completing before official release label Oct 23, 2023
@travistai2 travistai2 self-assigned this Oct 23, 2023
@andrew-edwards
Copy link
Member Author

Be nice to document the classes, but not completely necessary for Friday.

@andrew-edwards andrew-edwards removed the for Version 1.0.0.0 Needs completing before official release label Nov 9, 2023
@travistai2
Copy link
Contributor

Should documenting the classes just be an object .R documentation? Or what would the other options be?

@andrew-edwards
Copy link
Member Author

There was something in the link above (May 2 comment). I took the label off as didn't think it was 100% necessary for tomorrow (kind of helps us more than users).

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

2 participants