inbo / camtraptor

Camtraptor is an R package to read, explore and visualize Camera Trap Data Packages (Camtrap DP)
https://inbo.github.io/camtraptor/
MIT License
10 stars 2 forks source link

Create `deployments()`, `observations()` & `media()` to retrieve data #244

Closed PietrH closed 1 year ago

PietrH commented 1 year ago

232

Peter:

Suggested in camtraptor July 2023 coding sprint

Rationale: provide convenience functions to retrieve the tables/data frames from a camtrap dp object, so users don't have to retrieve them from package$data$tablename. Benefits:

Easier to understand than package$data$tablename Retrieving data is an important functionality, so should be tested Can be used by other functions that need to access the data Allows to change data model without affecting functionality Is in line with other suggested functions to retrieve data, such as taxonomy(), locations(), events()

PietrH commented 1 year ago

After discussion we've decided that check_package() should return TRUE for a valid camtrap-dp, or throw errors otherwise. Instead of the current behaviour where it'll return a package object

PietrH commented 1 year ago

Blocked by #247 for check_package(), is used in the new functions where it's expected to return TRUE when there are no issues.

damianooldoni commented 1 year ago

I also allowed GitHub Actions tests to be triggered when we create PRs to the v1.0 branch.