Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jokergoo/rhydrogen
translate comments to documentation in R
https://github.com/jokergoo/rhydrogen
Last synced: 24 days ago
JSON representation
translate comments to documentation in R
- Host: GitHub
- URL: https://github.com/jokergoo/rhydrogen
- Owner: jokergoo
- Created: 2014-10-12T18:52:50.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2021-02-27T19:39:37.000Z (over 3 years ago)
- Last Synced: 2024-05-09T07:45:05.253Z (6 months ago)
- Language: Perl
- Homepage:
- Size: 1.22 MB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Translate comments to documentations in R
Comments are marked as Markdown-style.
Now it supports S3 methods, S4 methods and S4 classes.
The module can be run as:
perl hydrogenize.pl your-package-directory
An example of the comment of a function is:
# == title
# title of the function
#
# == param
# -x a value returned by `function`
# -y a value returned by `package::function2`. If ``x`` is a list, then ...
#
# == details
# first line, blablabla...
#
# - item1...
# - item2...
#
# -item1 named item1...
# -item2 named itme2...
#
f = function(x, y) {
}would be converted to
\name{f}
\alias{f}
\title{
title of the function
}
\description{
title of the function
}
\usage{
f(x, y)
}
\arguments{
\item{x}{a value returned by \code{\link{function}}}
\item{y}{a value returned by \code{\link[package]{function2}}. If \code{x} is a list, then ...}
}
\details{
first line, blablabla...
\itemize{
\item item1...
\item item2...
}
\describe{
\item{item1}{named item1...}
\item{item2}{named itme2...}
}
}