[inlinedocs] [R-Forge] inlinedocs 1.3
Kurt Hornik
Kurt.Hornik at wu.ac.at
Mon Oct 18 21:04:57 CEST 2010
>>>>> Inlinedocs development team writes:
> [This message was generated by R-Forge]
> The following package was uploaded to CRAN:
> ===========================================
> Package: inlinedocs
> Version: 1.3
> Description: Generates Rd files from R source code with comments,
> providing for quick, sustainable package development. The syntax keeps code
> and documentation close together, and is inspired by the Don't Repeat
> Yourself principle.
> Author(s): Inlinedocs development team
> Maintainer: Inlinedocs development team
> <inlinedocs-support at lists.r-forge.r-project.org>
> License: GPL-3
> Submitter's comment:
> I\'ve checked the package on my machine and the win-builder, so it should
> pass the CRAN checks.
Thanks. I just got
* checking examples ... ERROR
Running examples in ‘inlinedocs-Ex.R’ failed
The error most likely occurred in:
> assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: package.skeleton.dx
> ### Title: Package skeleton deluxe
> ### Aliases: package.skeleton.dx 'inlinedocs '
>
> ### ** Examples
>
> library(inlinedocs)
>
> ## get the path to the silly example package that is provided with
> ## package inlinedocs
> testPackagePath=file.path( system.file(package="inlinedocs"),"silly" )
> ## copy example project to the current unlocked workspace that can
> ## be modified
> file.copy(testPackagePath,".",recursive=TRUE)
[1] TRUE
>
> ## generate documentation rd-Files for this package
> package.skeleton.dx("silly")
extra.code.docs parsefun author.from.description erase.format title.from.name examples.from.testfile examples.after.return examples.in.attr edit.package.file
Creating directories ...
Creating DESCRIPTION ...
Creating Read-and-delete-me ...
Copying code files ...
Making help files ...
Done.
Further steps are described in './silly/Read-and-delete-me'.
Modifying files automatically generated by package.skeleton:
silly.example: definition description item{return(res)} title item{first} item{second} item{third} details alias note references seealso keyword author format examples value
silly-package: title description tabular{ll} author
>
> ## display source file and the generated Rd file
> file.show( c(file.path("silly","R","silly.R"),
+ file.path("silly","man","silly.example.Rd") ),
+ header=c("source","rd") )
source
silly.example <- function
### this function does nothing in particular and does it very well
(
##title<<Simple function arguments
first, ##<< the first argument with a multi-line description
## which I really have to put here rather than explaining in the details.
second= ##<< the second argument with a list default value
## and descriptions of each of the elements
##describe<<
list(this="that", ##<< whichness
the="other", ##<< of the
rhubarb="stew", ##<< why
foo="bar"),
##end<<
third ##<< an argument that does nothing
)
{
##description<<why should I add to description?
##details<<
## if second is TRUE then first is returned
if ( second ){
##alias<<Long silly alias
res <- first
} else {
##details<<
## if second is not TRUE then a list is returned
##describe<<The contents of the list are:
res <- list(x=7, ##<< x coordinate
z= ##<< z describes everything else
##describe<<
list(colour=green, ##<< colour of line
width=2), ##<< width of line
##end<<
## and this line should get into documentation for z
y=10)##<< y coordinate
}
##note<< a note
##references<< a reference
##seealso<< \code{\link{silly-package}}
##keyword<<documentation utilities
return(res)
### invisible something not unrelated to first
##examples<<
##These lines got to the examples section in the documentation.
res <- silly.example(first="first",second=TRUE, third=3)
}
rd
\name{silly.example}
\alias{silly.example}
\alias{Long silly alias}
\title{Simple function arguments}
\description{this function does nothing in particular and does it very well
why should I add to description?}
\usage{
silly.example(first, second = list(this = "that", the = "other", rhubarb = "stew", foo = "bar"), third)
}
\arguments{
\item{first}{the first argument with a multi-line description
which I really have to put here rather than explaining in the details.}
\item{second}{the second argument with a list default value
and descriptions of each of the elements\describe{
\item{this}{whichness}
\item{the}{of the}
\item{rhubarb}{why}
}}
\item{third}{an argument that does nothing}
}
\details{if second is TRUE then first is returned
if second is not TRUE then a list is returned
The contents of the list are:\describe{
\item{x}{x coordinate}
\item{z}{z describes everything else\describe{
\item{colour}{colour of line}
\item{width}{width of line}
}
and this line should get into documentation for z}
\item{y}{y coordinate}
}}
\value{invisible something not unrelated to first}
\references{a reference}
\author{Keith Ponting <k.ponting at aurix.com>}
\note{a note}
\seealso{\code{\link{silly-package}}}
\examples{
##These lines got to the examples section in the documentation.
res <- silly.example(first="first",second=TRUE, third=3)
}
\keyword{documentation}
\keyword{utilities}
>
> ## check the package to see if generated documentation passes
> ## without WARNINGs
> checkLines <- system("R CMD check silly",intern=TRUE)
> stopifnot(length(grep("WARNING",checkLines))==0)
Error: length(grep("WARNING", checkLines)) == 0 is not TRUE
Execution halted
Any ideas?
Best
-k
More information about the Inlinedocs-support
mailing list