Version: | 1.2.0 |
Date: | 2024-04-30 |
Title: | Resources to Assist Novice Developers |
Maintainer: | Barry Zeeberg <barryz2013@gmail.com> |
Depends: | R (≥ 4.2.0) |
Imports: | utils, devtools |
Description: | Assist novice developers when preparing a single package or a set of integrated packages to submit to CRAN. Automate the following individual or batch processing: check local source packages; build local .tar.gz source files; install packages from local .tar.gz files; detect conflicts between function names in the environment. |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
Encoding: | UTF-8 |
VignetteBuilder: | knitr |
Suggests: | knitr, rmarkdown, testthat (≥ 3.0.0) |
RoxygenNote: | 7.3.1 |
Config/testthat/edition: | 3 |
NeedsCompilation: | no |
Packaged: | 2024-04-30 20:46:51 UTC; barryzeeberg |
Author: | Barry Zeeberg [aut, cre] |
Repository: | CRAN |
Date/Publication: | 2024-04-30 22:00:03 UTC |
checkBuildInstallSourcePackage
Description
check, build, and install local source package
Usage
checkBuildInstallSourcePackage(dir, packs, packCheck, autoLibrary = FALSE)
Arguments
dir |
character string containing the path name of the directory holding the package folders |
packs |
character vector of the names of the packages |
packCheck |
character vector of the names of the packages to check() |
autoLibrary |
Boolean if TRUE automate library() command altering search path |
Details
I wanted to include "library(packs)" in the program, but this is not allowed. The user can "cat" the return value and copy and paste to facilitate doing this manually.
Value
returns a list whose components are
-
character string that can be printed using "echo" and then copy and paste by the user to load or update the packages
-
return value of dateTable()
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")
l<-checkBuildInstallSourcePackage(sprintf("%s/%s",dir1,dir2),packs,packs,TRUE)
## End(Not run)
conflictOfInterest
Description
determine if there are any conflicts between the functions in the attached packages and the R global environment
Usage
conflictOfInterest()
Value
returns a list identifying the conflicts for each conflicted function
Examples
l<-conflictOfInterest()
conflictOfInterestRestricted
Description
restrict the conflicted functions (retrieved by conflictOfInterest()) to those in user-specified packages
Usage
conflictOfInterestRestricted(packs)
Arguments
packs |
character vector of user-specified packages |
Value
returns a subset of the return value of conflictOfInterest()
Examples
## Not run:
# you need to specify packs that are on your own computer !!
pack<-c("retrieve","tcpflow")
conflictOfInterestRestricted(pack)
## End(Not run)
dateTable
Description
list of file dates
Usage
dateTable(dt, f, when)
Arguments
dt |
date table in list format |
f |
character string containing the full path name of the file |
when |
character string either "before" or "after" |
Details
allows the user to confirm that the .tar.gz and the library packages are not left-overs
Value
updated version of dt
Examples
## Not run:
# you need to specify dir, f that is on your own computer !!
dt<-list()
dir<-"~/personal/hearts/hearts_card_game_bayesian_inference/packages"
f<-sprintf("%s/%s",dir,"NoviceDeveloperResources_1.1.0.tar.gz")
when<-"before"
dateTable(dt,f,when)
## End(Not run)
fExistsAge
Description
check for newly created file existence and age
Usage
fExistsAge(f)
Arguments
f |
character string containing the path name of the file |
Value
returns no values,but has side effect of terminating if file is not valid
Examples
## Not run:
# you need to specify f that is on your own computer !!
dir1<-"/Users/barryzeeberg/personal/hearts"
dir2<-"hearts_card_game_bayesian_inference/packages"
f<-"NoviceDeveloperResources_1.1.0.tar.gz"
fExistsAge(sprintf("%s/%s/%s",dir1,dir2,f))
## End(Not run)
formatSearchPack
Description
given a package name, reformat it as listed in the search path
Usage
formatSearchPack(pack)
Arguments
pack |
list of character strings containing the names of a package |
Value
returns list of package names formatted it as listed in the search path
Examples
pack<-c("retrieve","tcpflow")
formatSearchPack(pack)
getSysLib
Description
For consistency, make sure that we are always using the designated library rather than a random library
Usage
getSysLib()
Value
returns a character string containing the path name for the designated library
Examples
if(interactive()) {
sysLib<-getSysLib()
}
inSearchPack
Description
is the package listed in the search path
Usage
inSearchPath(pack)
Arguments
pack |
list of character strings containing the name of a package |
Value
returns list of Booleans TRUE if the package is listed in the search path
Examples
## Not run:
# you need to specify packs that are on your own computer !!
pack<-c("retrieve","tcpflow")
inSearchPath(pack)
## End(Not run)
zload
Description
detach old version of package from search path, load new version, and validate
Usage
zload(lib, pack, dt)
Arguments
lib |
character string containing the name of the user-designated library |
pack |
character string containing the name of a package |
dt |
date table in list format |
Value
returns updated version of date table
Examples
## Not run:
# you need to specify packs that are on your own computer !!
lib<-getSysLib()
dt<-list()
zload(lib,"NoviceDeveloperResources",dt)
## End(Not run)