Description Usage Arguments Details Value Author(s) See Also

View source: R/bichrom_dataset.R

Cleans and organizes dataset for BiChroM analyses

1 | ```
bichrom_dataset(chromwoodherb, size = 50, state.0 = "H", state.1 = "W")
``` |

`chromwoodherb` |
dataframe with two columns. First column contains chromosome numbers, second column has values of binary state. Row.names of data frame are taxon names |

`size` |
maximum haploid chromosome number allowed in analyses. See details. |

`state.0` |
value of binary state 0 in second column of chromwoodherb by default "H" indicating herbaceous. |

`state.1` |
value of binary state 1 in second column of chromwoodherb by default "W" indicating woody |

bichrom_dataset organizes chromosome numbers in three ways. First, it transforms chromosome numbers into haploid chromosome numbers, and for chromosome numbers that are not divisible by 2, floor value of chromosome number divided by 2 is taken. Second, changes haploid values larger than specified size to value size+1. And third, for taxa that are in binary state 1, redefines haploid chromosome numbers from size+2 to 2*(size+1). That is if a taxon has 6 chromosomes, state.1=1, and size=50 bichrom_dataset function will recode this individual with value 54 (3 haploid chromosome number, state 0 ranges from 1 to 51, and state 1 ranges from 52 to 102) for analyses with Q_bichrom

Returns a data frame with two columns. First column taxon name and second column haploid chromosome numbers codified by state. See details.

Rosana Zenil-Ferguson

Q_bichrom

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.