iNZightVIT / iNZightTS

The time series functionality designed for use within iNZight.
https://timeseries.inzight.nz/
1 stars 1 forks source link

R check errors #3

Closed tmelliott closed 6 years ago

tmelliott commented 7 years ago

Not sure where these popped up, but if @DongningZ could take a look and if its code you wrote, fix it up? I've pushed a few changes to the newdevice function and its docs/namespacing so sync before you update anything.

Assuming your R working directory is the iNZightTS directory, (e.g., getwd() = /some/path/to/iNZightTS), then

library(devtools)
document() # roxygenise the docs (incl. namespace)
check() # run R check
  1. Some variable bindings are obscure

    add.random: no visible binding for global variable ‘tsenv’
    add.seasonal: no visible binding for global variable ‘tsenv’
    forecastplot: no visible binding for '<<-' assignment to ‘temp.fit’    ****
    shiftLineUp: no visible binding for global variable ‘tsenv’

    **** this one is the only one I'm really worried about - not sure why <<- is being used in a package.

  2. Some undocumented functions - only worry about any that you wrote or worked on (and can therefore document!)

    Undocumented code objects:
    ‘compareplot’ ‘multiseries.1’ ‘multiseries.2p’ ‘recompose’
  3. Some documentation (that I'm sure you've written) seems out:

    Documented arguments not in \usage in documentation object 'decompositionplot':
    ‘t’
  4. Some examples are giving errors - only worry about any that you wrote.

And the test-code-for-the-function.R needs to be deleted.

DongningZ commented 7 years ago

I will be working on it.

DONGNING ZHANG

On 17/02/2017, at 09:53, Tom Elliott notifications@github.com<mailto:notifications@github.com> wrote:

Assigned #3https://github.com/iNZightVIT/iNZightTS/issues/3 to @DongningZhttps://github.com/DongningZ.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/iNZightVIT/iNZightTS/issues/3#event-965700396, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AWcesWoaqjjO6ohy61LxHpSbAE1H-hlNks5rdLargaJpZM4MDhu-.

tmelliott commented 7 years ago

Also it no longer works with iNZight - loading visitorsQ data, Date as time variable, plot gives:

Error in end[1] <- start[1] + (length(data[, var[1]]) + start[2] - 1)%/%freq (from iNZightTS.R#111) : 
  replacement has length zero
In addition: Warning message:
In is.na(freq) : is.na() applied to non-(list or vector) of type 'NULL'
DongningZ commented 7 years ago

Hi Tom,

Are all these bugs come from the code I wrote ? I tested several times before I uploaded them.. at least the examples shouldn't have any error..

DONGNING ZHANG

On 17/02/2017, at 11:12, Tom Elliott notifications@github.com<mailto:notifications@github.com> wrote:

Also it no longer works with iNZight - loading visitorsQ data, Date as time variable, plot gives:

Error in end[1] <- start[1] + (length(data[, var[1]]) + start[2] - 1)%/%freq (from iNZightTS.R#111) : replacement has length zero In addition: Warning message: In is.na(freq) : is.na() applied to non-(list or vector) of type 'NULL'

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/iNZightVIT/iNZightTS/issues/3#issuecomment-280478735, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AWcesfhNuHyrqSKmISFEsIUYv947TiVwks5rdMmrgaJpZM4MDhu-.

tmelliott commented 7 years ago

I don't know where they came from - except that the last one only occurred when I switched to your lastest push (the tss branch) - I'm assuming it will be something to do with get.ts.structure? If you're positive that the visitorsQ dataset (library(iNZightTS); data(visitorsQ) should load it) then just let me know and I'll look into it on my end.