Fix warnings and notes after running devtools::check().
maurolepore opened this issue · 5 comments
I replaced data/barro colorado island_formated_data.Rdata with data/DF.
I replace it because the name is long, has spaces, and doesn't match
the name of the object that it contains. Also, the format .Rdata throws
a warning with devtools::check():
checking contents of 'data' directory ... WARNING
Files not of a type allowed in a 'data' directory:
'barro colorado island_formated_data.Rdata'
Also:
checking for portable file names ... WARNING
Found the following file with a non-portable file name:
data/barro colorado island_formated_data.Rdata
These are not fully portable file names.
Please document this dataset in R/data.R
@ervanSTRI, please use the messages from devtools::check()
to identify arguments that you haven't yet documented and to remove arguments that you no longer use. This is a relatively easy fix, and will remove one warning.
* checking Rd \usage sections ... WARNING
Undocumented arguments in documentation object 'assignAGB'
'DAT' 'DBH'
Documented arguments not in \usage in documentation object 'assignAGB':
'site' 'D' 'WD'
Undocumented arguments in documentation object 'assignWD'
'DAT' 'WD'
Documented arguments not in \usage in documentation object 'assignWD':
'df' 'site' 'wsgdata' 'denscol'
...
This warning is a difficult to fix. Your datasets have non-ASCII characters and it may not be possible to replace them with ASCII characters. I've faced this problem before and I haven't figured out how to fix it.
* checking data for non-ASCII characters ... WARNING
Warning: found non-ASCII strings
'bigll3C�B!' in object 'WSG'
'pequeC�B1a' in object 'WSG'
Notes are less important to fix but it's good practice to try aim for 0 errors, 0 warnings, and 0 notes. This is the general requirement to submit to CRAN. Functions that use non-standard evaluation commonly cause this notes. For variables used in ggplot2, for example, you can fix this by refering to .data$x
instead of x
. I don't know if data.table has a pronoun similar to .data
. In any case, you can silent this note using: globalVariables(c("global-variable1", "global-variable2", "..."))
. A good place to place this is in R/imports.R.
checking R code for possible problems ... NOTE
LOAD: warning in objects(env, all = TRUE): partial argument match of
'all' to 'all.names'
assignAGB: no visible binding for global variable 'df'
assignAGB: no visible binding for global variable '..height'
assignAGB: no visible binding for global variable 'site'
assignAGB: no visible binding for global variable 'site.info'
assignWD: no visible binding for global variable 'DATA_path'
assignWD: no visible binding for '<<-' assignment to 'DATA_path'
assignWD: no visible binding for global variable 'path_folder'
... 104 lines ...