R/test_extension.R

Defines functions test_extension

test_extension <- function(name, extension)
{
    # obtain the extension of name
    ext = getExtension(basename(name))

    # if not the correct extension, stop
    if (ext != extension) {
        p = paste("'input_file' format and extension have to be \".", 
            extension, "\" (not \".",ext,"\").", sep="")
        stop(p)
    } 

    return(ext);
}

Try the LEA package in your browser

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

LEA documentation built on Nov. 8, 2020, 8:19 p.m.