pkgnet
pkgnet copied to clipboard
CreatePackageReport() fails on empty assignment in data.table()
I'm unsure of the exact issue, but the following code
pkg_name <- YOUR_PACKAGE_NAME
CreatePackageReport(
pkg_name
, report_path = file.path(getwd(), "report.html")
)
Yields an error like the following on the Function Network tab (generated by FunctionReporter
):
## Error in data.table::data.table(node = funs, type = "function"): Item 1 has no length. Provide at least one item (such as NA, NA_integer_ etc) to be repeated to match the 1 row in the longest column. Or, all columns can be 0 length, for insert()ing rows into.
I've observed this error for the following packages:
-
carData
-
datasets
-
extrafontdb
-
fontBitstreamVera
-
fontcm
-
fontLiberation
-
FrF2.catlg128
-
gamair
-
ggplot2movies
-
ISOcodes
-
ISwR
-
MEMSS
-
mlmRev
-
networkDynamicData
-
nycflights
-
pder
-
plogr
-
RcppProgress
-
rnaturalearthdata
-
TH.data
discovered via the code in #252
I've observed that most of the packages on this list also have 0 dependencies in the report produced by DependencyReporter
, with a message like this on the Dependency tab
## Error in log_fatal(sprintf(msg, self$pkg_name, paste(private$dep_types, : Package 'gamair' does not have any dependencies in [Imports, Depends]. If you think this is an error consider adding more dependency types in your definition of DependencyReporter. For example: DependencyReporter$new(dep_types = c('Imports', 'Depends', 'Suggests'))