Checking the package using devtools::check() resulted in a few notes, warnings on my machine:
#> Depends: includes the non-default packages:
#> 'ggplot2', 'sf', 'terra', 'qgisprocess', 'dplyr', 'ggnewscale',
#> 'tidyterra', 'colorspace', 'ggspatial'
#> Adding so many packages to the search path is excessive and importing
#> selectively is preferable.
and
#> Packages listed in more than one of Depends, Imports, Suggests, Enhances:
#> ‘ggplot2’ ‘sf’ ‘terra’ ‘qgisprocess’ ‘dplyr’ ‘ggnewscale’ ‘tidyterra’ ‘colorspace’ ‘ggspatial’
#> A package should be listed in only one of these fields.
and
#> It looks like this package (or one of its dependent packages) has an
#> unstated dependence on a standard package. All dependencies must be
#> declared in DESCRIPTION.
#> See section ‘The DESCRIPTION file’ in the ‘Writing R Extensions’
#> manual.
Regarding the above: Instead of loading all of these packages as dependencies, consider importing individual functions, e.g. using the roxygen tag @ImportFrom in your roxygen comments. This way, only the respective functions are imported from the dependency packages and written to NAMESPACE. Then, it would be sufficient to just keep all necessary packages as Imports in DESCRIPTION without also listing them under Depends.
#> Non-standard file/directory found at top level:
#> ‘images’
images/ is not a standard directory for R packages. Consider adding this directory to .Rbuildignore so that it is not used for building the package.
#> checkLeft: no visible global function definition for ‘st_transform’
#> checkLeft: no visible global function definition for ‘st_crs’
#> checkLeft: no visible global function definition for ‘mask’
#> checkLeft: no visible global function definition for
#> ‘qgis_run_algorithm’
#> checkLeft: no visible global function definition for
#> ‘qgis_extract_output’
#> checkLeft: no visible global function definition for ‘qgis_as_terra’
#> checkLeft: no visible global function definition for ‘st_join’
#> checkLeft: no visible global function definition for ‘%>%’
#> checkLeft: no visible global function definition for ‘ends_with’
#> checkLeft: no visible global function definition for ‘st_filter’
#> checkLeft: no visible global function definition for ‘na.omit’
#> checkLeft: no visible global function definition for ‘st_write’
#> checkMap: no visible global function definition for ‘st_buffer’
#> checkMap: no visible global function definition for ‘crop’
#> checkMap: no visible global function definition for ‘ext’
#> checkMap: no visible global function definition for ‘as.polygons’
#> checkMap: no visible global function definition for ‘st_crop’
#> checkMap: no visible global function definition for ‘%>%’
#> checkMap: no visible global function definition for ‘na.omit’
#> checkMap: no visible global function definition for ‘terrain’
#> checkMap: no visible global function definition for ‘shade’
#> checkMap: no visible global function definition for ‘ggplot’
#> checkMap: no visible global function definition for ‘geom_raster’
#> checkMap: no visible global function definition for ‘aes’
#> checkMap: no visible binding for global variable ‘x’
#> checkMap: no visible binding for global variable ‘y’
#> checkMap: no visible binding for global variable ‘hillshade’
#> checkMap: no visible global function definition for
#> ‘scale_fill_distiller’
#> checkMap: no visible global function definition for ‘new_scale_fill’
#> checkMap: no visible global function definition for
#> ‘scale_fill_continuous_sequential’
#> checkMap: no visible global function definition for ‘guides’
#> checkMap: no visible global function definition for ‘guide_colorsteps’
#> checkMap: no visible global function definition for ‘labs’
#> checkMap: no visible global function definition for ‘theme’
#> checkMap: no visible global function definition for ‘geom_sf’
#> checkMap: no visible global function definition for ‘element_blank’
#> checkMap: no visible global function definition for ‘element_rect’
#> checkMap: no visible global function definition for ‘annotation_scale’
#> checkMap: no visible global function definition for ‘unit’
#> checkMap: no visible global function definition for
#> ‘annotation_north_arrow’
#> checkMap: no visible binding for global variable
#> ‘north_arrow_fancy_orienteering’
#> checkMap: no visible binding for global variable ‘Pointtype’
#> checkMap: no visible global function definition for ‘bind_rows’
#> checkMap: no visible global function definition for ‘ggsave’
#> checkMin: no visible global function definition for ‘st_transform’
#> checkMin: no visible global function definition for ‘st_crs’
#> checkMin: no visible global function definition for
#> ‘qgis_run_algorithm’
#> checkMin: no visible global function definition for
#> ‘qgis_extract_output’
#> checkMin: no visible global function definition for ‘st_join’
#> checkMin: no visible global function definition for ‘%>%’
#> checkMin: no visible global function definition for ‘ends_with’
#> checkMin: no visible global function definition for ‘na.omit’
#> checkMin: no visible global function definition for ‘st_write’
#> checkRight: no visible global function definition for ‘st_transform’
#> checkRight: no visible global function definition for ‘st_crs’
#> checkRight: no visible global function definition for ‘mask’
#> checkRight: no visible global function definition for
#> ‘qgis_run_algorithm’
#> checkRight: no visible global function definition for
#> ‘qgis_extract_output’
#> checkRight: no visible global function definition for ‘qgis_as_terra’
#> checkRight: no visible global function definition for ‘st_join’
#> checkRight: no visible global function definition for ‘%>%’
#> checkRight: no visible global function definition for ‘ends_with’
#> checkRight: no visible global function definition for ‘st_filter’
#> checkRight: no visible global function definition for ‘na.omit’
#> checkRight: no visible global function definition for ‘st_write’
#> checkSides: no visible global function definition for ‘st_transform’
#> checkSides: no visible global function definition for ‘st_crs’
#> checkSides: no visible global function definition for ‘mask’
#> checkSides: no visible global function definition for
#> ‘qgis_run_algorithm’
#> checkSides: no visible global function definition for
#> ‘qgis_extract_output’
#> checkSides: no visible global function definition for ‘qgis_as_terra’
#> checkSides: no visible global function definition for ‘st_join’
#> checkSides: no visible global function definition for ‘%>%’
#> checkSides: no visible global function definition for ‘ends_with’
#> checkSides: no visible global function definition for ‘st_filter’
#> checkSides: no visible global function definition for ‘na.omit’
#> checkSides: no visible global function definition for ‘st_write’
#> checkWidth: no visible global function definition for ‘na.omit’
#> checkWidth: no visible global function definition for
#> ‘qgis_run_algorithm’
#> checkWidth: no visible global function definition for
#> ‘qgis_extract_output’
#> checkWidth: no visible global function definition for ‘%>%’
#> checkWidth: no visible global function definition for ‘rename’
#> checkWidth: no visible binding for global variable ‘HubDist’
#> checkWidth: no visible global function definition for ‘st_join’
#> checkWidth: no visible binding for global variable ‘line_id’
#> checkWidth: no visible global function definition for ‘ends_with’
#> checkWidth: no visible global function definition for ‘st_write’
#> checkWidth: no visible global function definition for ‘ggplot’
#> checkWidth: no visible global function definition for ‘geom_sf’
#> checkWidth: no visible global function definition for ‘aes’
#> checkWidth: no visible binding for global variable ‘width’
#> checkWidth: no visible global function definition for ‘geom_sf_label’
#> checkWidth: no visible binding for global variable ‘class_id’
#> checkWidth: no visible global function definition for
#> ‘scale_color_binned’
#> checkWidth: no visible global function definition for ‘guides’
#> checkWidth: no visible global function definition for
#> ‘guide_colorsteps’
#> checkWidth: no visible global function definition for ‘labs’
#> checkWidth: no visible global function definition for ‘theme’
#> checkWidth: no visible global function definition for ‘theme_void’
#> checkWidth: no visible global function definition for ‘element_blank’
#> checkWidth: no visible global function definition for ‘element_rect’
#> checkWidth: no visible global function definition for
#> ‘annotation_scale’
#> checkWidth: no visible global function definition for ‘unit’
#> checkWidth: no visible global function definition for
#> ‘annotation_north_arrow’
#> checkWidth: no visible binding for global variable
#> ‘north_arrow_fancy_orienteering’
#> Undefined global functions or variables:
#> %>% HubDist Pointtype aes annotation_north_arrow annotation_scale
#> as.polygons bind_rows class_id crop element_blank element_rect
#> ends_with ext geom_raster geom_sf geom_sf_label ggplot ggsave
#> guide_colorsteps guides hillshade labs line_id mask na.omit
#> new_scale_fill north_arrow_fancy_orienteering qgis_as_terra
#> qgis_extract_output qgis_run_algorithm rename scale_color_binned
#> scale_fill_continuous_sequential scale_fill_distiller shade st_buffer
#> st_crop st_crs st_filter st_join st_transform st_write terrain theme
#> theme_void unit width x y
#> Consider adding
#> importFrom("stats", "na.omit")
#> to your NAMESPACE file.
Your package uses some functions from dependency packages that are not declared as imported (and thus in the worst case could not be found). Consider using the roxygen tag @ImportFrom to declare functions imported from other functions.
#> Rd file 'checkMin.Rd':
#> \examples lines wider than 100 characters:
#> mini <- checkMin(dsm, tracks, export = FALSE, dist_cross = 1, profile_length = 1, dist_cross_points = 0.05, st_dev = 0)
#> Rd file 'checkRight.Rd':
#> \examples lines wider than 100 characters:
#> checkMap(dsm, tracks, points = right) #run checkMap() as many times as you like to get different examples
#> Rd file 'checkSides.Rd':
#> \examples lines wider than 100 characters:
#> sides <- checkSides(dsm, tracks, export = FALSE, dist_cross = 1, profile_length = 1, dist_cross_points = 0.05)
#> checkMap(dsm, tracks, points= sides) #run checkMap() as many times as you like to get different examples
#> Rd file 'checkWidth.Rd':
#> \examples lines wider than 100 characters:
#> width <- checkWidth(dsm , tracks, export = FALSE, plot = TRUE, dist_cross = 1, profile_length = 1, dist_cross_points = 0.05, st_dev = 0 ... [TRUNCATED]
#> These lines will be truncated in the PDF manual.
and
#> Undocumented code objects:
#> ‘mini’ ‘sides’ ‘tracks’
#> Undocumented data sets:
#> ‘mini’ ‘sides’ ‘tracks’
#> All user-level objects in a package should have documentation entries.
#> See chapter ‘Writing R documentation files’ in the ‘Writing R
#> Extensions’ manual.
Consider adapting your documentation to fit the above mentioned margin for example code and, more importantly, add documentation for undocumented objects.
Thank you for the feedback Jakob, I will update this. For me that's interesting, because devtools::check() won't result in the same for me, so I didn't notice :)
Checking the package using
devtools::check()
resulted in a few notes, warnings on my machine:and
and
Regarding the above: Instead of loading all of these packages as dependencies, consider importing individual functions, e.g. using the roxygen tag
@ImportFrom
in your roxygen comments. This way, only the respective functions are imported from the dependency packages and written toNAMESPACE
. Then, it would be sufficient to just keep all necessary packages asImports
inDESCRIPTION
without also listing them underDepends
.images/
is not a standard directory for R packages. Consider adding this directory to.Rbuildignore
so that it is not used for building the package.Your package uses some functions from dependency packages that are not declared as imported (and thus in the worst case could not be found). Consider using the roxygen tag
@ImportFrom
to declare functions imported from other functions.and
Consider adapting your documentation to fit the above mentioned margin for example code and, more importantly, add documentation for undocumented objects.