Skip to content

Add $ wrapper to @ for ATO objects #10

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

Merged
merged 1 commit into from
Apr 8, 2025
Merged

Add $ wrapper to @ for ATO objects #10

merged 1 commit into from
Apr 8, 2025

Conversation

mhpob
Copy link
Contributor

@mhpob mhpob commented Apr 8, 2025

This PR adds a method to the $ generic for ATO objects. Nothing fancy like the get_ functions -- just a wrapper around slot(object, name) with a warning that this was done for convenience and @ should be used in the future.

Scroll to line 184 in R/get_methods.R to review -- everything before that was automatic formatting from Air.

r$> ato <- init_ato()

r$> ato$det
Warning in ato$det :
  `ato$det` converted to `ato@det` for convenience, please use `ato@det` in the future.
  See `?slot` for more information.
[1] datetime        frac_second     receiver_serial transmitter     sensor_value    valid
<0 rows> (or 0-length row.names)

r$> ato$det$datetime
Warning in ato$det :
  `ato$det` converted to `ato@det` for convenience, please use `ato@det` in the future.
  See `?slot` for more information.
POSIXct of length 0

r$> ato$dep
Warning in ato$dep :
  `ato$dep` converted to `ato@dep` for convenience, please use `ato@dep` in the future.
  See `?slot` for more information.
 [1] receiver_model           receiver_serial          receiver_codeset         deploy_location          deploy_datetime
 [6] deploy_lat               deploy_lon               deploy_z                 recover_datetime         recover_lat
[11] recover_lon              transmitter              transmitter_manufacturer transmitter_ping_rate    transmitter_model       
[16] transmitter_serial      
<0 rows> (or 0-length row.names)

@hugomflavio hugomflavio merged commit a4a32bc into main Apr 8, 2025
5 checks passed
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

Successfully merging this pull request may close these issues.

2 participants