readSourceFromRForge: readSourceFromRForge

Description Usage Arguments Details Value Author(s) Examples

View source: R/SweaveListingUtils.R

Description

reads a source file (usually ‘.R’ oder ‘.Rd’) from R forge repository

Usage

1
2
3
readSourceFromRForge(PKG, TYPE, FILENAME, PROJECT,
                     fromRForge = getSweaveListingOption("fromRForge"),
                     base.url = getSweaveListingOption("base.url"))

Arguments

PKG

character; name of package to be downloaded

TYPE

character; style of the source code — "man" or "R"

FILENAME

character; the name of the source file to be downloaded

PROJECT

character; the name of the R-Forge project

fromRForge

logical; shall code be downloaded from an R-Forge mirror? Defaults to the corresponding global option

base.url

character; base url from where to download the code sniplet

Details

reads source file from R-forge [from most recent revision in trunc], but caches the result in a global list in the namespace of package SweaveListingUtils, so if the URL has already been cached, the cached copy is used. The cached copies are stored in list .CacheFiles; the current length of this list is stored in .CacheLength.

Value

the character content of the source file

Author(s)

Peter Ruckdeschel peter.ruckdeschel@uni-oldenburg.de

Examples

1
readSourceFromRForge("distr","R","AllClasses.R","distr")

SweaveListingUtils documentation built on May 30, 2017, 6:29 a.m.