Skip to content

Commit

Permalink
update NEWS and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lschneiderbauer committed Dec 28, 2024
1 parent 66f0fc5 commit 2da64ad
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

- Add more convenience S3 methods: `print()`, `[]`, `as.matrix()`, `rbind()`, `as_tibble()`.

- New helper: `u()` and `ddu()`: include improved physical unit treatment with the [units](https://r-quantities.github.io/units/) package. Frequency and time parameters can now be "units" objects, created with `u()`. Allow user to adjust `plot()` scales to use arbitrary time/frequency units.
- New unit helper functions: `u()` and `du()`: include improved physical unit treatment with the [units](https://r-quantities.github.io/units/) package. Frequency and time parameters can now be "units" objects, created with `u()`. Allow user to adjust `plot()` scales to use arbitrary time/frequency units.

- `fcwt_batch()`: in some cases, time slices were accidentally discarded, this should now be fixed. In general the batching mechanism should be much more reliable now.

- `fcwt()`: fix a bug where `fcwt(..., n_freqs = 1, ...)` leads to a faulty data representation.

- `fcwt()`: added the option to choose between a linear or logarithmic frequency scale.
- `fcwt()`: add `freq_scale` argument to choose between a linear or logarithmic frequency scale.

# fcwtr 0.2.1

Expand Down
10 changes: 5 additions & 5 deletions R/units.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#' Bestow units to a number
#' Augment a quantity with a physical unit
#'
#' A wrapper around [units::set_units()] mostly to have a short name to
#' create a dimensionful number.
#' create a dimensionful quantity.
#'
#' @param x A numeric value to be bestowed with a unit.
#' @param x A numeric vector to be augmented with a unit.
#' @param unit
#' A character indicating the unit. See [units::valid_udunits()] and
#' [units::valid_udunits_prefixes()] for possible units.
Expand All @@ -27,13 +27,13 @@ u <- function(x, unit) {
units::set_units(x, unit, mode = "standard")
}

#' Drop unit
#' Drop physical units from a quantity
#'
#' Drop units from a dimensionful quantity and retrieve a dimensionless number.
#' The dimensionless number is defined by the ratio of `x` and one unit `u(1, unit)`.
#'
#' @param x
#' A dimensionful quantity (S3 class "units"), e.g. generated with [u()] or
#' A dimensionful numeric vector (S3 class "units"), e.g. generated with [u()] or
#' subsequent calculations.
#' @inheritParams u
#' @return
Expand Down
4 changes: 2 additions & 2 deletions man/du.Rd

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

6 changes: 3 additions & 3 deletions man/u.Rd

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

0 comments on commit 2da64ad

Please sign in to comment.