reversePackageDependencies {NoviceDeveloperResources2}R Documentation

reversePackageDependencies

Description

separate the packages in packs list having length zero or non-zero dependencies

Usage

reversePackageDependencies(l)

Arguments

l

return value of retrieveNamespace()

Details

the return value ll is like:

$original [cardUtils is no longer a name of ll$original since it had length 0]

$original$editDriver

[1] "cardUtils" "clickableImageMap" "heartsCIM" "logos" "probTab"

$zeros

$zeros$cardUtils cardUtils is an element of ll$zeros since l[["cardUtils"]] has length 0

[1] "cardUtils"

Value

returns a list whose components are 2 lists:

$original

a list whose components are lists of package names that have non-zero length import dependencies ll$original is same as l, but deleting zero-length elements i.e., leaf nodes

$zeros

a list whose components are lists of package names that have zero length import dependencies (i.e., leaf nodes) ll$zeros zero-length elements, leaf nodes that had been deleted in ll$original

Examples

## Not run: 
# 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/"
packs<-c("cardUtils","clickableImageMap","editDriver",
"heartsCIM","iterationDriver","logos","playOneTrick",
"playWholeHandDriverPassParams","probTab","relaxDriver")
l<-retrieveNamespace(sprintf("%s/%s",dir1,dir2),packs)
ll<-reversePackageDependencies(l)

## End(Not run)


[Package NoviceDeveloperResources2 version 1.1.0 Index]