R/check_database.R

Defines functions check_database

check_database <- function( database, 
                            allowed_db = c( "psycur15", "psycur16",  "ALL" ) ) {  
    #database <- toupper( database )
    if( sum( database %in% allowed_db ) == 1 ) {
        return( database )
    } else {
        stop("Invalid given 'database' ('", database, "'). ", 
             'Try ?psygenetGene or \"?psygenetDisease\" to check the ',
             'available databases.')
    }
}

Try the psygenet2r package in your browser

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

psygenet2r documentation built on Jan. 31, 2021, 2 a.m.