-
Notifications
You must be signed in to change notification settings - Fork 3
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
S3/S4-based wrappers around R6 classes for more R-like API #48
Comments
+1 to this Consider the RNetCDF API pattern where you pass an open object to a function that works with it. e.g. |
@keller-mark -- here's what I've got cooking. https://code.usgs.gov/wma/nhgf/geo-data-portal/rnz/-/tree/develop The README there shows the basics of what it does so far. I am going to get a copy of that repository public at: https://github.com/DOI-USGS/rnz and will do the rest of the development on a dirty main branch but there's a bit more paperwork to get cleared before it's done. |
I implemented: #' Returns results of listing the store
#'
#' @param x a pizzar Store object
#' @export
names.Store <- function(x) {
x$listdir()
} And a side affect that is kind of unfortunate is: > class(store)
[1] "DirectoryStore" "Store" "R6" Not sure what the UX of working with these classes really should be, but I'm not sure that R6 and S3 should really coexist based on this? |
might be some relevance in the new S7 on your questions here (if you haven't seen that): https://blog.r-project.org/2024/05/17/generalizing-support-for-functional-oop-in-r/index.html |
I need to sit quietly with some examples of how to implement subsetting and assignment. @keller-mark -- do you feel like the implementations of bracket methods in |
From discussions with @pieterjanvc the non-R6 API would be much more natural for the R ecosystem
The text was updated successfully, but these errors were encountered: