fix_column_names_2: Automatically fix column names using the second algorithm

View source: R/fix_column_names_2.R

fix_column_names_2R Documentation

Automatically fix column names using the second algorithm

Description

In order to use many of the function of this package, it is required that the ID columns are given by particular names. Comparison ID column should be named Comparison, Clinical sample ID should be named SampleID and Replicate measurement ID should be named ReplicateID. If given names deviates from the standard names, one might experience problems when using some of the functions found in this package

Usage

fix_column_names_2(
  data,
  n_ids = 3,
  LFDT = FALSE,
  MOR = FALSE,
  slack = 3,
  print_matches = FALSE
)

Arguments

data

A data frame or data table with format LFDT or WFDT having n_ids ID columns. The ID columns are not required to be ordered as is the case for fix_column_names()

n_ids

The number of ID columns found in data

LFDT

Is the data on long-format with comparison, i.e., TRUE or on wide format without comparison which corresponds to FALSE

MOR

Is the data only consisting of mean of replicates? If so, set this to TRUE. Or else, set this to FALSE

slack

How much deviance from look-up table should be allow.

print_matches

Should the matches for the respective ID columns from data be displayed? If there are more than four matches, only the first four will be presented and the rest omitted

Details

You need to be careful with how you specify LFDT, MOR and n_ids as wrong combinations of these may not be supported. Contact Author for further information

Value

A data table identical to input data but ID column names are potentially replaced with standard ones if they are found in respective look-up tables

Examples

fix_column_names_2(sampled_eqam_measurements, LFDT = FALSE, MOR = FALSE, slack = 1, print_matches = TRUE)

pernille267/commutability.selectivity documentation built on July 20, 2022, 9:11 a.m.