Giter VIP home page Giter VIP logo

efts's People

Contributors

derob avatar jmp75 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

derob

efts's Issues

Set up CI and code coverage

I thought I had taken notes on setting up CI for an R package and what options seemed available, but cannot locate anymore within efts notes. Look at other public and private repos.

Dollar sign tab completion requires utils:::findMatches but R CMD check complains (Note)

The only tab completion for ref class objects I could get relies on a call to an unexported method. I recall spending a fair bit of time finding a working example, so not keen on changing this as a priority. May need to to be squeaky clean with cran.

* checking dependencies in R code ... NOTE
Unexported object imported by a ':::' call: ‘utils:::findMatches’
  See the note in ?`:::` about the use of this operator.

Make it easier to specify the lead time axis

Right now this is at least not straightforward to specify a custom lead time axis (as opposed to the main time axis). For example a lead time that is in "hours since time" and 3, 6, 9, 12 etc.

Incorrect time dimension, offset by a second compared to user specifications.

Something is amiss for some dim specifications such as "days since 2015-04-10 22:00:00 +0000"

Zooming in on to the root cause of the problem:

library(devtools)
library(lubridate)

devtools::load_all("c:/src/github_jm/efts")

x <- "hours since 2015-10-04 22:00:00 +0000"
get_start_date(x)
# [1] "2015-10-04 22:00:00 UTC"

# Wrong
x <- "days since 2015-10-04 22:00:00 +0000"
get_start_date(x)
# [1] "2015-10-04 21:59:59 UTC"
get_start_date(x,time_zone = 'Australia/Perth')

# OK
refDateUnits <- "hours since 1970-01-01 00:00:00 +0000"
time_units <- "hours since 2015-04-29 22:00:00 +0000"
udunits2::ud.convert(0, time_units, refDateUnits)
offsetSinceRef <- udunits2::ud.convert(0, time_units, refDateUnits)
offsetFun <- lubridate::dhours
refDate + offsetFun(offsetSinceRef)

# OK
refDate <- lubridate::origin  
refDateUnits <- "days since 1970-01-01 00:00:00 +0000"
time_units <- "days since 1970-04-29 22:00:00 +0000"
offsetSinceRef <- udunits2::ud.convert(0, time_units, refDateUnits)
offsetFun <- lubridate::ddays
refDate + offsetFun(offsetSinceRef)

# Wrong
refDate <- lubridate::origin  
refDateUnits <- "days since 1970-01-01 00:00:00 +0000"
time_units <- "days since 2015-04-29 22:00:00 +0000"
offsetSinceRef <- udunits2::ud.convert(0, time_units, refDateUnits)
offsetFun <- lubridate::ddays
refDate + offsetFun(offsetSinceRef)

# [1] "2015-04-29 21:59:59 UTC"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.