Comments (4)
Thanks. Is this related to #18?
from hms.
Here is a more general fix, covering base operations and summaries (like sum, min, max, range), and mean()
I can work on a PR if the change is desired.
Ops.hms <- function(e1, e2) {
res <- NextMethod(.Generic)
if (inherits(res, "difftime")) {
hms::as_hms(res)
} else {
res
}
}
Summary.hms <- function(..., na.rm) {
res <- NextMethod(.Generic)
hms::as_hms(res)
}
mean.hms <- function(x, ...) {
hms::as_hms(NextMethod(.Generic))
}
from hms.
Trying to understand the neccessary test cases:
Relevant classes appear to be all of: Date
, POSIXct
and POSIXlt
(possibly with timezones and times around DST), difftime
(base), hms
.
Once with hms
on the LHS and once with hms
on the RHS (with expect_error()
where appropriate).
Is that assessment correct?
from hms.
Multiplying with and dividing by numeric or integer? Otherwise, this looks fairly complete.
from hms.
Related Issues (20)
- Move `master` branch to `main` HOT 3
- parse_hms() fails to parse when the duration is longer than one day
- Can hms objects be comapred with strings? HOT 1
- Loading tidyverse doesn't load hms package. HOT 2
- Parse without seconds
- Inconsistency between tibble and vector formatting if "hours" component is zero HOT 1
- Tools for decomposing a datetime into date + hms + timezone and back HOT 1
- bug detected in an Rmd, If the filter (from dplyr) generates 0 lines with one column typed hms
- Support `seq` for hms values
- Floor/Ceiling HMS
- Advance deprecation for `is.hms`/`as.hms`
- Implement comparaison with character and -/+ HOT 3
- Make as_hms() generic HOT 1
- Infloop with dev vctrs HOT 1
- Difficult to understand error message for a input of a double with attributes HOT 2
- vec_math() and vec_arith() for hms HOT 4
- Re-license as MIT HOT 4
- `unique()` returns an object of class numeric HOT 2
- cut() method for `hms` class
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hms.