toCharacter | R Documentation |
Converts designated columns of a dataframe to character. Defaults to
converting columns id
, sire
, and dam
.
toCharacter(df, headers = c("id", "sire", "dam"))
df |
a dataframe where the first three columns can be coerced to character. |
headers |
character vector with the columns to be converted to
character class. Defaults to |
A dataframe with the specified columns converted to class "character" for display with xtables (in shiny)
library(nprcgenekeepr)
pedGood <- nprcgenekeepr::pedGood
names(pedGood) <- c("id", "sire", "dam", "sex", "birth")
class(pedGood[["id"]])
pedGood <- toCharacter(pedGood)
class(pedGood[["id"]])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.