parse_file: Parse the input Rd file to a list

Description Usage Arguments Value Author(s) Examples

View source: R/rd2roxygen.R

Description

This function uses the function parse_Rd in the tools package to parse the Rd file.

Usage

1
parse_file(path)

Arguments

path

the path of the Rd file

Value

a named list containing the documentation sections as strings

Author(s)

Hadley Wickham; modified by Yihui Xie <http://yihui.org>

Examples

1
2
rd.file = system.file("examples", "parse_and_save.Rd", package = "Rd2roxygen")
parse_file(rd.file)

Example output

$title
[1] "Parse the input Rd file and save the roxygen documentation into a file."

$usage
[1] "parse_and_save(path, file, usage=FALSE)"

$desc
[1] "Parse the input Rd file and save the roxygen documentation into a file."

$value
[1] "a character vector if \\code{file} is not specified, or write the vector\ninto a file"

$author
[1] "Hadley Wickham; modified by Yihui Xie <\\url{http://yihui.name}>"

$name
[1] "parse_and_save"

$params
[1] "path the path of the Rd file"                                     
[2] "file the path to save the roxygen documentation"                  
[3] "usage logical: whether to include the usage section in the output"

Rd2roxygen documentation built on July 2, 2020, 2:51 a.m.