Learn R Programming

mindr (version 1.2.1)

rmd2r: Convert .md or .Rmd files into a .R script

Description

Convert .md or .Rmd files into a .R script

Usage

rmd2r(filepattern = "*.[R]*md$", path = ".", savefile = TRUE, savefilename = NA, 
    backup = TRUE, heading = " --------", chunkheading = FALSE)

Arguments

filepattern

the pattern of the file names

path

the path of the folder which contains the .Rmd or .md files

savefile

logical. Whether to save the output as a file.

savefilename

the destinated file name

backup

logical. whether backup the existent file

heading

the indicator of the headings

chunkheading

logical. whether treat chunk options as headings (ending with ----)

Value

a .R script

Examples

Run this code
# NOT RUN {
path <- system.file("examples/r", package = "mindr")
rmd2r(path = path)
# }

Run the code above in your browser using DataLab