R/generics.R

##### Prepared for future use, when hyfo becomes a class.


# # change to hyfo
# setGeneric('as.hyfo', function(x) {
#   standardGeneric('as.hyfo')
# })
# 
# setMethod('as.hyfo', signature('list'),
#           function(x) {
#             
#             if (!is.null(x$Members)) {
#               hyfo <- new("hyfo.multiMember", varName = x$Variable$varName, xyCoords = x$xyCoords, Dates = x$Dates, Data = x$Data,
#                           Members = x$Members)
#             } else {
#               hyfo <- new("hyfo", varName = x$Variable$varName, xyCoords = x$xyCoords, Dates = x$Dates, Data = x$Data)
# 
#             }
#             return(hyfo)            
#             
#           })
# 

Try the hyfo package in your browser

Any scripts or data that you put into this service are public.

hyfo documentation built on Aug. 16, 2023, 5:08 p.m.