nameTable: This is a standardising function which allows SHAPE to...

Description Usage Arguments Value Examples

View source: R/sourceSHAPE.R

Description

This is a standardising function which allows SHAPE to programatiically name tables for the fitness landscape OR split a named table and extract the embedded information from its naming.

Usage

1
2
3
4
5
nameTable(func_tmpMutations, func_tmpIndex = NULL,
  func_baseString = getOption("shape_string_tableNames"),
  func_sepString = getOption("shape_sepString"),
  func_splitName = FALSE,
  func_subNaming = getOption("shape_db_splitTables"))

Arguments

func_tmpMutations

Integer value(s) for the number of mutations to be expected in mutants stored within the named tables.

func_tmpIndex

An optinal element that will be used to insert a unique vector ID

func_baseString

This is the standard prefix character string used in table naming.

func_sepString

This is a character string used to collapse vectors of characters.

func_splitName

A logical toggle to control if this function is splitting a named table or not. So, FALSE (default) means we're creating a table name whereas TRUE is splitting a named table into it's parts.

func_subNaming

This is a logical which controls if the tables which report on all genotypes with X mutations should be forced into a single table or it SHAPE is allowed to split them into multiple tables.

Value

If func_splitName is TRUE, then a vector of table names is returned, it would be best practice to not assume recycling of passed elements and so pass equally lengthed vectors as input. If FALSE, we split the table and return the data detailing the number of mutations which ought to be present for genotypes stored in the named table.

Examples

1
2
3
4
# This creates a table name in a standard way, it can also split table names to extract info.
defineSHAPE()
nameTable(2,1,"myTest","_",FALSE,FALSE)
nameTable("myTest_2",func_splitName = TRUE)

rSHAPE documentation built on July 19, 2019, 5:05 p.m.

Related to nameTable in rSHAPE...