Skip to contents

Convert markdown string tables to data.frame

Usage

markdown2df(text, autoformat = TRUE)

Arguments

text

Character. Markdown text representing a table.

autoformat

Boolean. Automatically format numerical, logical and date values to their classes?

Examples

txt <- "| Item | Value |\n|------|-------|\n| 50C  | 122F  |\n| 300K | 80.33F |"
markdown2df(txt)
#> # A tibble: 2 × 2
#>   Item  Value 
#>   <chr> <chr> 
#> 1 50C   122F  
#> 2 300K  80.33F