extract_property_names: Extract the property names from a given 'data.frame'

View source: R/extract_property_names.R

extract_property_namesR Documentation

Extract the property names from a given data.frame

Description

This function aims to extract the column names of properties from x. A property in this context is a response vector of numerical values that then later can be calibrated for predictions (such as with calibrate).

Usage

extract_property_names(x)

Arguments

x

a data.frame, as normally obtained by proximate_read_data, read_spc, proxiscout_read_data, or some other data parsing function.

Details

Depending on the class of x, the names of the properties are identified differently. For all cases, only columns which contain numerical values (including NA) are considered as potential properties.

If x is of class proximate_data, the property names are identified as follows:

  • Located between columns "Reference" and "Begin".

  • Not named according to any of the following names: "ROW", "Check", "Date", "SNR", "SRN", "ID", "Barcode", "Note", "Result", "Reference", "Begin", "End", "Recipe", "Composition", "Images", "spc".

  • Contain only numerical values (including NA).

If x is of class proxiscout_data, property names are identified as columns that contain only numerical values (including NA) and are not matched by any of the following, case-insensitive regex (each wrapped by ^ and $):

  • id

  • ⁠sample[_. ]?name⁠

  • ⁠captured[_. ]?at⁠

  • ⁠device[_. ]?id⁠

  • ⁠created[_. ]?(by|at)⁠

  • ⁠on[_. ]?behalf[_. ]?of⁠

  • ⁠lot[_. ]?name⁠

  • ⁠scanner([_. ]?id)?⁠

  • ⁠original[_. ]?value⁠

  • ⁠display[_. ]?value⁠

  • note

  • location

  • supplier

  • device

  • spc

  • predictions

  • .repetition_group (internal column added by proxiscout_read_data)

If x is of neither class, all columns with numerical values are considered to be properties

Value

A character vector, containing only the names of numerical properties. If no property names were identified, return a character vector of length 0.


proximetricsR documentation built on Sept. 4, 2026, 5:08 p.m.