Generic_nifti_replacement.R

#' @rdname %ff%-methods
#' @aliases %%<-,nifti-method
#' @export
setMethod("%%<-", 
          signature(object="nifti"), 
          function(object, value) { 
            if ( "%ff%" %in% slotNames(object) ){
              object@"%ff%" <- value
              audit.trail(object) <-
                niftiAuditTrailEvent(object, "modification", match.call(),
                                     paste("%ff% <-", value))               
            } else {
              warning("%ff% is not in slotNames of object")
            }                       
            return(object)
          })
muschellij2/oro.nifti documentation built on Nov. 28, 2023, 5:36 a.m.