Session Info
``` Session info ---------------------------------------------------------------------------------------------------------------------------
setting value
version R version 3.4.4 (2018-03-15)
system x86_64, linux-gnu
ui RStudio (1.1.453)
language (EN)
collate en_CA.UTF-8
tz America/Regina
date 2018-06-12
Packages -------------------------------------------------------------------------------------------------------------------------------
package * version date source
base * 3.4.4 2018-03-16 local
compiler 3.4.4 2018-03-16 local
datasets * 3.4.4 2018-03-16 local
devtools 1.13.5 2018-02-18 CRAN (R 3.4.3)
digest 0.6.15 2018-01-28 CRAN (R 3.4.3)
graphics * 3.4.4 2018-03-16 local
grDevices * 3.4.4 2018-03-16 local
memoise 1.1.0 2017-04-21 CRAN (R 3.4.1)
methods * 3.4.4 2018-03-16 local
stats * 3.4.4 2018-03-16 local
tools 3.4.4 2018-03-16 local
utils * 3.4.4 2018-03-16 local
withr 2.1.2 2018-03-15 CRAN (R 3.4.4)
yaml 2.1.18 2018-03-08 CRAN (R 3.4.3)
```
There are a couple of issues:
The function name i(hydrograph.plot) is delimited by a period. This is not what the Google style guide recommends https://google.github.io/styleguide/Rguide.xml#identifiers:
function names have initial capital letters and no dots
Currently all of our function names begin with lower-case letters, but using the dot as a delimiter can cause problems on Windows systems as the second word can be confused with the file extension.
I get these warnings when I run check()
hydrograph.plot: no visible global function definition for ‘par’
hydrograph.plot: no visible global function definition for ‘plot’
hydrograph.plot: no visible global function definition for ‘grid’
hydrograph.plot: no visible global function definition for ‘polygon’
hydrograph.plot: no visible global function definition for ‘lines’
hydrograph.plot: no visible global function definition for ‘axis’
hydrograph.plot: no visible global function definition for ‘mtext’
hydrograph.plot: no visible global function definition for ‘legend’
Undefined global functions or variables:
axis grid legend lines mtext par plot polygon
Consider adding
importFrom("graphics", "axis", "grid", "legend", "lines", "mtext",
"par", "plot", "polygon")
to your NAMESPACE file.
You can add the functions to NAMESPACE, by adding statements to hydrology-package.R, i.e.
The functions called from other packages all need to be specified using the :: notation, specifying the name of the package, as in graphics::axis() etc.
Session Info
``` Session info --------------------------------------------------------------------------------------------------------------------------- setting value version R version 3.4.4 (2018-03-15) system x86_64, linux-gnu ui RStudio (1.1.453) language (EN) collate en_CA.UTF-8 tz America/Regina date 2018-06-12 Packages ------------------------------------------------------------------------------------------------------------------------------- package * version date source base * 3.4.4 2018-03-16 local compiler 3.4.4 2018-03-16 local datasets * 3.4.4 2018-03-16 local devtools 1.13.5 2018-02-18 CRAN (R 3.4.3) digest 0.6.15 2018-01-28 CRAN (R 3.4.3) graphics * 3.4.4 2018-03-16 local grDevices * 3.4.4 2018-03-16 local memoise 1.1.0 2017-04-21 CRAN (R 3.4.1) methods * 3.4.4 2018-03-16 local stats * 3.4.4 2018-03-16 local tools 3.4.4 2018-03-16 local utils * 3.4.4 2018-03-16 local withr 2.1.2 2018-03-15 CRAN (R 3.4.4) yaml 2.1.18 2018-03-08 CRAN (R 3.4.3) ```There are a couple of issues:
You can add the functions to NAMESPACE, by adding statements to
hydrology-package.R
, i.e.The functions called from other packages all need to be specified using the :: notation, specifying the name of the package, as in
graphics::axis()
etc.