parseParamsFromRownames: Parse Parameter Values from Rownames

View source: R/utils.R

parseParamsFromRownamesR Documentation

Parse Parameter Values from Rownames

Description

Parses parameter values from rownames. Particularly useful for sensitivity analyses, when rows have been constructed to contain information about the parameter values, e.g. "maxEE.R_8_truncLen.R_250".

Usage

parseParamsFromRownames(
  df,
  param1,
  param2,
  keep_rownames = FALSE,
  keep_original_cols = TRUE
)

Arguments

df

Data frame with rownames containing parameter values of the form param_name1param_value1param_name2_param_value2.

param1, param2

Parameter names embedded within the rownames of df.

keep_rownames

(Default FALSE) Whether to keep the rownames of the original dataframe.

keep_original_cols

(Default TRUE) Whether to keep the columns of the original dataframe.

Value

A data frame containing columns corresponding to the values of the parameters of interest, extracted from the rownames of the original data frame.

Examples

## Not run:  trackReadsWithParamVals <- parseParamsFromRownames(trackReads, PARAM1, PARAM2) 

claraqin/neonMicrobe documentation built on April 11, 2024, 11:47 a.m.