Closed
Description
Is there a road map to offer in-place mutation of an S7 object?
Ideally, I would be able to create a method that update the value of the S7 object while returning another object.
Here is a bit of a contrived example based on what I'm working on.
my_job <- new_class("my_job", properties = list(status = class_character))
job_status <- new_generic("job_status", "job")
method(job_status, my_job) <- function(job) {
# do something
new_status <- "computing"
job@status <- new_status
list(status = "computing", value = "some other derived value")
}
Metadata
Metadata
Assignees
Labels
No labels