R2Rmd: Function to convert R file into Rmd file with chunks

Description Usage Arguments Value

View source: R/R2Rmd.R

Description

Function to convert R file into Rmd file with chunks

Usage

1
2
3
R2Rmd(fileName, outFormat = "unknown", rmessage = FALSE,
  rwarning = FALSE, textTitle = NULL, Author = NULL, Date = NULL,
  saveFileName = NULL, plotEcho = TRUE)

Arguments

fileName

The R 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 3 in Rmd file). The other is outFormat = 1, which returns the number of "#" in Rmd file as below.

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

(the number of "#" in Rmd file) = 0 (if (the number of "#" in R file) <= 2)

rmessage

Show message for chunks in the Rmd file or not.

rwarning

Show warning for chunks in the Rmd file or not.

textTitle

The title of the Rmd file.

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

Author

The author of the Rmd file.

Date

The date of the Rmd file.

saveFileName

The name of the Rmd file to be saved.

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

plotEcho

Show the code for plotting in chunks or not.

Value

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


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