tidyverse / hms

A simple class for storing time-of-day values
https://hms.tidyverse.org/
Other
138 stars 25 forks source link

Dynamically install and uninstall as.hms.units() provided by the units package #24

Closed krlmlr closed 5 years ago

krlmlr commented 8 years ago

Problem: The units package implements as.hms.units() but doesn't necessarily need to import the units package.

Solution: units declares hms as "Enhances", hms patches its S3 methods table when units is loaded or unloaded.

@hadley: PTAL; this could be described in a "vctrs" vignette; the problem of type conversion without importing will reappear.

@edzer: Would you mind adding "Enhances: hms (>= 0.2-2)" instead of edzer/units@24f1b61?

codecov-io commented 8 years ago

Current coverage is 100% (diff: 100%)

Merging #24 into master will not change coverage

@@           master   #24   diff @@
===================================
  Files           3     3          
  Lines          57    61     +4   
  Methods         0     0          
  Messages        0     0          
  Branches        0     0          
===================================
+ Hits           57    61     +4   
  Misses          0     0          
  Partials        0     0          

Powered by Codecov. Last update 80b2bfc...7e8f133

krlmlr commented 5 years ago

Can be solved in {units} with vctrs::s3_register() .