This helper function can be used by other functions to validate user 'corpora' parameter values passed to the query functions.

validPath(targetPath)

Arguments

targetPath

Vector of strings representing path to validate in pathTree.

Examples

validPath(c('childes', 'childes', 'Clinical'));
#> [1] TRUE

validPath(c('childes', 'childes', 'somethingThatDoesNotExist'));
#> [1] "Invalid path at:  somethingThatDoesNotExist"
#> [1] FALSE