Converts a given ‘Rd’ file into a list object

R/rd-to-list.R

rd_to_list

Description

This function is meant to be used as an intermediate object that could be used as an easy way to convert the information inside the ‘Rd’ into other formats or outputs.

Usage

Arguments

Arguments Description
path The path to the source Rd file

Value

A list object that contains the contents of the Rd file

Examples

library(pkgsite)
example_pkg <- system.file("example", package = "pkgsite")
rd_to_list(file.path(example_pkg, "man", "rd_to_list.Rd"))
#> $source
#> [1] "R/rd-to-list.R"
#> 
#> $name
#> [1] "rd_to_list"
#> 
#> $alias
#> [1] "rd_to_list"
#> 
#> $title
#> [1] "Converts a given 'Rd' file into a list object"
#> 
#> $usage
#> [1] "rd_to_list(rd_file, project = \".\", pkg = NULL)"
#> 
#> $arguments
#> $arguments[[1]]
#> $arguments[[1]]$argument
#> [1] "rd_file"
#> 
#> $arguments[[1]]$description
#> [1] "The name of the source Rd file"
#> 
#> 
#> $arguments[[2]]
#> $arguments[[2]]$argument
#> [1] "project"
#> 
#> $arguments[[2]]$description
#> [1] "The path to the root folder of the project."
#> 
#> 
#> $arguments[[3]]
#> $arguments[[3]]$argument
#> [1] "pkg"
#> 
#> $arguments[[3]]$description
#> [1] "The path inside the project folder. Use only if the R package itself is in a sub-folder within the project."
#> 
#> 
#> 
#> $value
#> [1] "A list object that contains the contents of the Rd file"
#> 
#> $description
#> [1] "This function is meant to be used as an intermediate object that could be used as an easy way to convert the information inside the 'Rd' into other formats or outputs."
#> 
#> $examples
#> $examples$code_dont_run
#> [1] "library(pkgsite)\nrd_to_list(\"rd_to_list.Rd\", project = \".\")"
#> 
#> 
#> $seealso
#> [1] "Other Conversion functions: `index_to_qmd()`, `rd_to_qmd()`"
#> 
#> $concept
#> [1] "Conversion functions"

See Also

Other Conversion functions: index_to_qmd(), rd_to_qmd()