quickstart: Prompt the user for information in order to generate an...

View source: R/quickstart.R

quickstartR Documentation

Prompt the user for information in order to generate an rtfSweave compatible Sweave file skeleton to help a user get started using rtfSweave

Description

Interactively ask the user a series of questions to generate a file which can be weaved using rtfSweave. The questions include the file name, document orientation, margins, etc.

Usage

quickstart()

Details

Assuming the named the skeleton file report.Rrtf, it would look something like this:

{\rtf1
{\SweaveInput report-header.rtf}

<<information, engine=none>>=

This code chunk will be ignored since 'engine' is neither 'R' nor 'S'

@


<<build-function, eval=false, echo=false>>=
## You can use this function to "build" the RTF file
build <- function() {
    Sweave("test.Rrtf",
           RweaveRtf(),
           SweaveSyntaxRtf,
           prefix.string = "figures/fig")
}
@

}

Value

This function returns nothing but generates the following files and directories:

  • A documentation + code “skeleton” file usually with file extension Rrtf. This file includes a code chunk with a build function that can be evaluated to weave the file.

  • A header file containing RTF boilerplate based on the answers to the prompts. It is “included” into the documentation + code file to reduce clutter in the main file.

  • A user-specified subdirectory defaulting to figures which holds the figures. (This applies only if the subdirectory does not already exist.)

Author(s)

Stephen Weigand <weigand.stephen@mayo.edu>

Examples

quickstart()

rtfSweave documentation built on June 21, 2022, 3:01 p.m.