Rmd2R: Function to convert Rmd file into R file

Description Usage Arguments Value

View source: R/Rmd2R.R

Description

Function to convert Rmd file into R file

Usage

1
2
3
Rmd2R(fileName, outFormat = "unknown", Numbering = TRUE,
  remainExplanation = TRUE, textTitle = NULL, addTitle = TRUE,
  saveFileName = NULL)

Arguments

fileName

The Rmd file name which you want to refer.

outFormat

The output format for the subtitle (chapter title). The default is "unknown", and this will result in the simplest format (the number of "#" will always be 4 in R file). The other is outFormat = 1, which returns the number of "#" in Rmd file as below.

(the number of "#" in R file) = 8 - (the number of "#" in Rmd file)

Numbering

Add chapter numbers for each subtitle (chapter title) or not.

remainExplanation

Remain explanations in the original Rmd file or remove those.

textTitle

The title of the R file.

If textTitle = NULL, the file name will be used.

addTitle

Add title part in the R file or not.

saveFileName

The name of the R file to be saved.

If saveFileName = NULL, the file name will be used. (only file extension will change)

Value

Nothing. Coverted ".R" file will be created.


KosukeHamazaki/RconVerteR documentation built on June 18, 2020, 10:08 a.m.