Learn R Programming

rpact (version 5.0.0)

getComparisonParameterNames: Select Comparison Parameters

Description

Selects varying parameters, axis candidates, or grouping variables from comparison-data columns. Column order is retained.

Usage

getComparisonParameterNames(
  data,
  ...,
  varyingOnly = TRUE,
  type = "all",
  exclude = character(),
  maxNumberOfLevels = 5L,
  binaryIntegerAsFactor = TRUE
)

Value

A character vector of column names. No plot or GUI state is changed.

Arguments

data

A data.frame, typically obtained with as.data.frame() from a trial comparison. Columns must be one-dimensional atomic vectors, including factors and dates.

...

Further arguments. Currently unused.

varyingOnly

Whether to exclude constant and empty columns.

type

One of "all", "continuous", "factor", "binary", or "groupable". Groupable columns are categorical or have at most maxNumberOfLevels observed values. An empty column is never groupable. Continuous binary columns remain eligible as continuous axes.

exclude

Character vector of names to exclude, e.g., identifiers or variables already selected for an axis or a category.

maxNumberOfLevels

Positive upper limit for numerical grouping variables.

binaryIntegerAsFactor

Whether integer-valued binary variables are also eligible for use as factors. This does not change the source column.

Examples

Run this code
data <- data.frame(alpha = 0.025, effect = c(0.2, 0.3), power = c(0.8, 0.9))
getComparisonParameterNames(data)
getComparisonParameterNames(data, exclude = "effect", type = "continuous")

Run the code above in your browser using DataLab