R/type.R

Defines functions type type.neurocdf

Documented in type type.neurocdf

##' @export
type <- function(object,...) UseMethod("type")

##' Extract different 'types' of neuro netCDF files
##'
##' @title Extract different 'types' of neuro netCDF files
##' @param object netCDF filename
##' @param ... Additional low level argument parsed on to lower level functions
##' @author Klaus K. Holst
##' @aliases type type.neurocdf
##' @S3method type neurocdf
##' @method type neurocdf
type.neurocdf <- function(object,...) {
  if (!file.exists(object)) stop("netCDF file not found")
  nc <- with(neuro.env, openNCDF)(object)
  types <- as.vector(with(neuro.env, getvarNCDF)(nc,"SubjectDescription",c(1,2,1,1),c(-1,1,-1,1)))
  with(neuro.env, closeNCDF)(nc)
  return(types)
}
kkholst/neurocdf documentation built on May 20, 2019, 10:59 a.m.