Skip to content

Commit

Permalink
minor reformatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mailund committed Aug 13, 2016
1 parent 2eca8f6 commit d727646
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 19 deletions.
4 changes: 2 additions & 2 deletions NAMESPACE
@@ -1,8 +1,6 @@
# Generated by roxygen2: do not edit by hand

S3method("[",units)
S3method("units<-",numeric)
S3method("units<-",units)
S3method(Math,units)
S3method(Ops,units)
S3method(Summary,units)
Expand All @@ -17,6 +15,8 @@ S3method(print,units)
S3method(quantile,units)
S3method(units,units)
S3method(weighted.mean,units)
export("units<-")
export("units<-.units")
export(as.dt)
export(as.units)
import(stats)
Expand Down
6 changes: 3 additions & 3 deletions R/conversion.R
Expand Up @@ -8,7 +8,7 @@ NULL
#' Set measurement units on a numeric vector
#'
#' @param x numeric vector
#' @param value character; valid unit of measurement string
#' @param value character; unit of measurement string
#'
#' @return object of class \code{units}
#' @export
Expand All @@ -20,10 +20,10 @@ NULL
#' class(x)
#' y = 2:5
#' try(units(y) <- "xxy") # error
`units<-.numeric` = function(x, value) {
`units<-.numeric` = function(x, strict.ud = FALSE, value) {
stopifnot(is.character(value))
if (!ud.is.parseable(value))
stop(paste(value, "not recognized as a unit of measurement"))
stop(paste(value, "not recognized as a udunits2 unit of measurement"))
attr(x, "units") = value
class(x) = "units"
x
Expand Down
2 changes: 1 addition & 1 deletion man/Math.units.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions man/Ops.units.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/as.dt.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/as.units.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/as.units.difftime.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions man/units-set-.numeric.Rd → man/units-set.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/units.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/units.units.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions units.Rproj
Expand Up @@ -15,3 +15,4 @@ LaTeX: pdfLaTeX
BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source
PackageRoxygenize: rd,collate,namespace

0 comments on commit d727646

Please sign in to comment.