update_mass_props_and_unc: Update mass properties and uncertainties

View source: R/massprops.R

update_mass_props_and_uncR Documentation

Update mass properties and uncertainties

Description

update_mass_props_and_unc() updates mass properties and uncertainties for a specified target row from specified source rows in a data frame.

Usage

update_mass_props_and_unc(
  df,
  target,
  sources,
  override = set_poi_conv_from_target
)

Arguments

df

A data frame with (at least) these columns: id, mass, Cx, Cy, Cz, Ixx, Iyy, Izz, Ixy, Ixz, Iyz, POIconv, Ipoint, sigma_mass, sigma_Cx, sigma_Cy, sigma_Cz, sigma_Ixx, sigma_Iyy, sigma_Izz, sigma_Ixy, sigma_Ixz, sigma_Iyz.

target

The id value of the target row.

sources

List of id values of the of the source rows.

override

An override function, called as override(df, target, value). The default override sets the POI sign convention of a computed aggregate to the POIconv column of the target row in the data frame.

Value

The updated data frame.

Examples

leaves <- list("Widget", "2nd Part")
update_mass_props_and_unc(sawe_table, "Combined", leaves)


massProps documentation built on April 4, 2025, 1:45 a.m.