Learn R Programming

NoviceDeveloperResources2 (version 1.1.0)

retrieveNamespace: retrieveNamespace

Description

retrieve a list of the imported packages in a NAMESPACE FILE

Usage

retrieveNamespace(dir, packs)

Value

returns a list containing the intersection of (1) imported package names and (2) packs list

Arguments

dir

character string containing the name of the directory holding packs

packs

list of package names

Examples

Run this code
if (FALSE) {
# you need to specify dir, packs that are on your own computer !!
dir1<-"~/personal/hearts/hearts_card_game_bayesian_inference"
dir2<-"packages/inference_packages/inference_packages/"
dir<-sprintf("%s/%s",dir1,dir2)
packs<-c("cardUtils","clickableImageMap","editDriver",
"heartsCIM","iterationDriver","logos","playOneTrick",
"playWholeHandDriverPassParams","probTab","relaxDriver")
rns<-retrieveNamespace(dir,packs)
}

Run the code above in your browser using DataLab