Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • See what's new at GitLab
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
I
irg
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4
    • Issues 4
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 0
    • Merge Requests 0
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Alec L. Robitaille
  • irg
  • Issues
  • #23

Closed
Open
Opened Feb 13, 2019 by Matt Dowle@mattdowle
  • Report abuse
  • New issue
Report abuse New issue

One line change to pass next data.table release please

Dear Alec,

Thanks for your reply on email supporting this change in data.table.

https://github.com/Rdatatable/data.table/pull/3310

https://github.com/Rdatatable/data.table/issues/3347

I've tested irg and it's just a one line change that's needed :

https://gitlab.com/robit.a/irg/blob/master/R/model.R#L316

from :

fitDT <- DT[rep(1:.N, each = 366)][, t := julseq$t]

to :

fitDT <- DT[rep(1:.N, each = 366)][, t := rep(julseq$t, length.out=.N)]

Will you be able to update irg on CRAN please?

Best, Matt

(I wasn't sure how to submit pull request on GitLab. I hope as an issue is ok.)

The error without this fix is :

> fit <- model_ndvi(mods, observed = FALSE)
Error in `[.data.table`(DT[rep(1:.N, each = 366)], , `:=`(t, julseq$t)) : 
  Supplied 366 items to be assigned to 40260 items of column 't'. The RHS length must either be 1 (single values are ok) or match the LHS length exactly. If you wish to 'recycle' the RHS please use rep() explicitly to
 make this intent clear to readers of your code.
Calls: model_ndvi -> [ -> [.data.table
Execution halted
Edited Feb 13, 2019 by Matt Dowle
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: robit.a/irg#23