tableToDescription: Generates species descriptions

Description Usage Arguments Details Value Author(s) Examples

View source: R/tableToDescription.R

Description

This function will generate a txt file with species descriptions.

Usage

1
tableToDescription(data, filename = "species_descriptions.txt")

Arguments

data

data.frame

filename

character

Details

It requires a data.frame where the first three columns are the character description, putative complement and the character to use as separator (i.e., words that will remain constant across descriptions). The character description and/or the complement might be empty. The remaining columns are the species with their respective character states, where each row is a character. The function accepts any number of species and/or characters.

Value

Exports a txt file

Author(s)

Marcelo Reginato

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## loading the example data

data(monographaR_examples)
monographaR_examples$tableToDescription -> data
head(data)

## the first column is just an identifier for the characters, we need to 
## remove it before running the analysis

data[,-1] -> data

## running the function, it will print in the terminal the output. 
## To export a txt, place a name in the filename argument 
## (i.e., filename = "myoutput.txt")

tableToDescription(data, filename = "")

monographaR documentation built on Oct. 23, 2020, 8:05 p.m.