Skip to content

Commit

Permalink
fix internal propagate function + bump version, update NEWS
Browse files Browse the repository at this point in the history
  • Loading branch information
Enchufa2 committed Jan 18, 2025
1 parent 083fbcd commit 191d5c1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: errors
Type: Package
Title: Uncertainty Propagation for R Vectors
Version: 0.4.2.1
Version: 0.4.3
Authors@R: c(
person("Iñaki", "Ucar", email="[email protected]",
role=c("aut", "cph", "cre"), comment=c(ORCID="0000-0001-6403-5550")),
Expand Down
3 changes: 2 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# errors devel
# errors 0.4.3

- Add option `decimals` to `format()` method to add support for uncertainty with
decimals in the `parenthesis` notation (@alusiani #60, #61 addressing #47).
- Fix internal `propagate` function (for r-quantities/units#371).

# errors 0.4.2

Expand Down
2 changes: 1 addition & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ propagate <- function(xx, x, y, dx, dy, method=getOption("errors.propagation", "
"taylor-first-order" = {
# propagate variance to new object
var <- rowSums(cbind(
.e(x)^2 * dx^2, .e(y)^2 * dy^2, 2 * covar(x, y) * dx * dy
.e(x)^2 * dx^2, .e(y)^2 * dy^2, 2 * as.numeric(covar(x, y)) * dx * dy
), na.rm = TRUE)
var[var < 0] <- 0
xx <- set_errors(xx, sqrt(var))
Expand Down
1 change: 1 addition & 0 deletions errors.Rproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Version: 1.0
ProjectId: e20fca44-19ee-4310-9b19-07aeed7090bb

RestoreWorkspace: Default
SaveWorkspace: Default
Expand Down

0 comments on commit 191d5c1

Please sign in to comment.