Go to Sign up
Note: Your files never leave your device. We don't upload, transfer, or store your data.
|
|
|
|
|---|---|---|
|
|
|
The Markdown To R DataFrame Converter on A.Tools transforms Markdown pipe-delimited tables into R data.frame() code — valid R syntax you can paste directly into R scripts, R Markdown files, or RStudio console. All processing runs in your browser. No data leaves your device.
Data is often documented in Markdown tables within README files and wikis. R requires data as data.frame objects for analysis, visualization, and modeling. This tool converts between the two without manual typing.
Click Enter Data to paste a Markdown table into the input area, or click Choose File to drag and drop a .md file. Press Sample to load example data.
Once parsed, an interactive spreadsheet appears. Use the toolbar to:
Add or delete rows and columns
Transpose the table (swap rows and columns)
Remove duplicate rows
Delete empty rows and columns
Change text case (UPPERCASE, lowercase, Capitalize)
Find and replace values — supports case-sensitive search and regex
Toggle First Row as Header to define column names
Right-click any cell for context-menu operations.
In the Properties panel:
| Setting | Default | Description |
|---|---|---|
| Variable Name | df | The R variable name assigned to the data frame |
| Indent Size | 2 spaces | Indentation inside the data.frame() call |
Click Convert to generate R code. Use Copy to Clipboard or Download File to save as a .R file.
Two input modes: Paste Markdown directly or upload a .md file via drag-and-drop
Full table editor: Edit, transpose, deduplicate, find-and-replace before converting
Custom variable name: Set any valid R variable name
Configurable indentation: 2, 4, 8 spaces or tabs
Client-side processing: Files never leave the browser — zero data upload
Undo/Redo: Full edit history with revert support
Context menu: Right-click for quick row/column/cell operations
Header toggle: Treat the first row as column names or regular data
Validation indicator: Real-time feedback on input validity
Given this Markdown input:
| name | age | city |
|-------|-----|-------------|
| Alice | 30 | New York |
| Bob | 25 | Los Angeles |
The tool generates:
df <- data.frame(
name = c("Alice", "Bob"),
age = c("30", "25"),
city = c("New York", "Los Angeles"),
stringsAsFactors = FALSE
)
Column names are derived from the header row and converted to valid R identifiers (lowercase, spaces replaced with dots)
All values are wrapped in c() as character vectors
stringsAsFactors = FALSE is included to prevent automatic factor conversion
The variable name defaults to df and is customizable
With First Row as Header enabled (default), the output uses named columns. With it disabled, the output is a character matrix:
df <- data.frame(
V1 = c("name", "Alice", "Bob"),
V2 = c("age", "30", "25"),
V3 = c("city", "New York", "Los Angeles"),
stringsAsFactors = FALSE
)
A data frame is R's primary structure for tabular data. It is a list of vectors of equal length, where each vector is a column. Data frames are used throughout R for:
Statistical analysis: lm(), glm(), summary(), aggregate()
Data manipulation: dplyr, tidyr, data.table
Visualization: ggplot2, plot(), lattice
Import/export: read.csv(), readxl::read_excel()
Machine learning: caret, randomForest, xgboost
# Create a data frame
df <- data.frame(
name = c("Alice", "Bob"),
age = c(30, 25)
)
# Access columns
df$name # "Alice" "Bob"
df[1, ] # First row
df[, 2] # Second column
R data frames support multiple column types (numeric, character, factor, Date, logical). The output from this tool generates all columns as character vectors. Convert types in R as needed:
df$age <- as.integer(df$age)Official documentation: R data.frame reference
| Scenario | Why Convert |
|---|---|
| R scripts | Paste documentation data directly into analysis scripts |
| R Markdown (.Rmd) | Include data in reproducible reports |
| Shiny apps | Generate sample data for interactive dashboards |
| Statistical analysis | Convert documented data into analysis-ready data frames |
| Teaching | Transform example tables from textbooks into runnable R code |
| Data cleaning prototypes | Quickly move documented specs into R for processing |
| Unit testing | Generate test fixtures from specification tables |
# analysis.R
patients <- data.frame(
name = c("Alice", "Bob", "Charlie"),
age = c("30", "25", "35"),
city = c("New York", "Los Angeles", "Chicago"),
stringsAsFactors = FALSE
)
patients$age <- as.integer(patients$age)
summary(patients)
---
title: "Patient Analysis"
output: html_document
---
```{r}
df <- data.frame(
name = c("Alice", "Bob"),
age = c("30", "25"),
stringsAsFactors = FALSE
)
df$age <- as.integer(df$age)
knitr::kable(df)
```
No. All file parsing and conversion runs in your browser using JavaScript. Your data stays on your device. A.Tools never receives, stores, or transmits your file contents.
The tool supports standard pipe-delimited Markdown tables following the CommonMark specification, including tables with or without leading/trailing pipes and alignment indicators.
The tool generates a data.frame() call with named columns from the header row, all values as character vectors, and stringsAsFactors = FALSE. See the "What the Output Looks Like" section above for examples.
Yes. The generated code is valid R 3.x and 4.x syntax. Paste it into RStudio, R console, or any .R file.
Yes. All values are wrapped in c("...") as character strings. Use as.integer(), as.numeric(), as.Date(), or as.logical() in R to convert types as needed.
Yes. Enter any valid R variable name in the Variable Name field. R variable names should start with a letter and contain only letters, numbers, dots, and underscores.
Yes. After parsing, the full table editor lets you modify cells, add or remove rows and columns, transpose, deduplicate, change text case, and find-and-replace values.
Processing is client-side, so the limit depends on your browser's memory. Tables with tens of thousands of rows work reliably on modern browsers.