set_poi_conv_from_target: Set POI convention for mass properties list to match a target...

View source: R/massprops.R

set_poi_conv_from_targetR Documentation

Set POI convention for mass properties list to match a target item

Description

set_poi_conv_from_target() sets the products of inertia sign convention for a mass properties list to that of a target item in a mass properties table. This convention determines how products of inertia are saved to the data frame.

The signature ⁠of set_poi_conv_from_target()⁠ is such that it can be passed as an override argument to update_mass_props() and update_mass_props_and_unc(), thus ensuring that all calculated POI values follow the negative integral convention of the target item to which they are written.

Usage

set_poi_conv_from_target(df, target, mp)

Arguments

df

A data frame with columns id and POIconv.

target

The id value of the target row.

mp

A mass properties list.

Value

The mass properties list with the named element poi_conv set to the POIconv column of the target row in the data frame.

Examples

set_poi_conv_from_target(mp_table, "C.1.2.2.3.2.1", get_mass_props(mp_table, "C.1.2.2.3.2.1.1"))


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