Learn R Programming

PubChemR (version 3.0.0)

pc_feature_table: Build a Modeling-Ready Feature Table

Description

Retrieves compound property fields and returns them in a flat table intended for feature engineering and modeling workflows.

Usage

pc_feature_table(
  identifier,
  properties = c("MolecularWeight", "XLogP", "TPSA", "HBondDonorCount",
    "HBondAcceptorCount"),
  namespace = "cid",
  numeric_only = TRUE,
  error_mode = c("stop", "result"),
  ...
)

Value

A tibble of compound features suitable for downstream modeling workflows.

Arguments

identifier

Identifier vector for compound property retrieval.

properties

Compound property names.

namespace

Namespace for identifier.

numeric_only

If `TRUE`, coerce feature columns to numeric where possible.

error_mode

Error behavior. `"stop"` (default) throws an error on retrieval failure. `"result"` returns a typed `PubChemResult` failure.

...

Additional arguments passed to `pc_property()`.

Details

Transport metadata columns are removed from the returned table. With `numeric_only = TRUE`, feature columns are opportunistically converted to numeric where conversion yields at least one finite value.

Examples

Run this code
names(formals(pc_feature_table))

if (FALSE) {
pc_feature_table(2244, properties = c("MolecularWeight", "XLogP"))
}

Run the code above in your browser using DataLab