R/Data.R

Data <- 
  setRefClass("Data", 
              fields = list(
                data = "data.frame", 
                ncol = "integer", 
                nrow = "integer",
                names = "character"),  
              methods = list(
                
                initialize = function(...) {
                  callSuper(...)
                  ncol <<- ncol(data)
                  nrow <<- nrow(data)
                  names <<- colnames(data)
                },
                
                column = function(col) {
                  return(data[, col])   
                }, 
                
                subset = function(row, col) {
                  return(data[row, col])
                })
  )

Try the blockForest package in your browser

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

blockForest documentation built on April 3, 2023, 5:49 p.m.