use pkgnet to analyze a source folder (including covr statistics)

get_pnet(sourcedir, serialize = TRUE, overwrite = TRUE)

Arguments

sourcedir

character(1) should contain an R package

serialize

logical(1) defaults to TRUE, See note.

overwrite

logical(1) defaults to TRUE; if FALSE will fail if [basename(sourcedir)]_pnet.rds exists

Value

See Note.

Note

By default, serializes an S3 instance of BBT_pkgnet, a list with components dep for dependency report, and fun for function interrelationships, saved as RDS to [basename(sourcedir)]_pnet.rds. If serialize is FALSE, simply returns the object. This is intended to be used on a large number of packages and thus a checkpointing approach is the default.

Examples

td = tempdir()
cur = getwd()
setwd(td)
pdy = system.file("demo_srcs/parody", package="BiocQE")
get_pnet(pdy)
#> FATAL [2021-12-29 05:51:32] pkgnet could not find an installed package named 'parody'. Please install the package first.
#> Error in log_fatal(msg): pkgnet could not find an installed package named 'parody'. Please install the package first.
file.exists("parody_pnet.rds")
#> [1] FALSE
class(readRDS("parody_pnet.rds"))
#> Warning: cannot open compressed file 'parody_pnet.rds', probable reason 'No such file or directory'
#> Error in gzfile(file, "rb"): cannot open the connection
setwd(cur)