R/as.emg.matrix.R

Defines functions as.emg.matrix

Documented in as.emg.matrix

as.emg.matrix <- function(x, ...) {
    args <- list(...)
    namesargs <- names(args)
    if ("samplingrate" %in% namesargs) 
        samplingrate <- args$samplingrate else samplingrate <- 0
    if ("units" %in% namesargs) 
        units <- args$units else units <- ""
    data <- x
    if (dim(data)[2] > 1) {
        dimnames(data) <- NULL
    } else {
        attributes(data) <- NULL
    }
    object <- emg(data, samplingrate = samplingrate, units = units, data.name = colnames(x))
    return(object)
}

Try the biosignalEMG package in your browser

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

biosignalEMG documentation built on Feb. 18, 2018, 9:02 a.m.