# to require "data.phen", run like this:
# (stops if file is missing)
# require_files_phen("data")
# The following example is more awkward
# because package sample data has to be specified in this weird way:
# check that the samples we want exist
# get path to an existing phen file
file <- system.file("extdata", 'sample.phen', package = "genio", mustWork = TRUE)
# remove extension
file <- sub('\\.phen$', '', file)
# since sample.phen file exist, this will not stop with error messages:
require_files_phen(file)
Run the code above in your browser using DataLab