@eagleoutice/flowr-dev
Version:
Static Dataflow Analyzer and Program Slicer for the R Programming Language
24 lines (23 loc) • 1.71 kB
TypeScript
/** the base packages R attaches to the search path on startup, so their exports are usable without a `library` call */
export declare const AttachedBasePackages: readonly string[];
/** {@link AttachedBasePackages} for membership tests, which happen far more often than iteration. */
export declare const AttachedBasePackageSet: ReadonlySet<string>;
/**
* The base packages available at the assumed R version (all of them if omitted). A package counts as
* available when that R release lies within the range it was part of core; e.g. `parallel` (added in R
* 2.14.0) is absent for an assumed R 2.10, and long-merged packages like `ctest` are absent for modern R.
*
* The newest release is served from the precomputed {@link RBasePackageStore.current} array.
* Every other version is computed once and memoized, so this never recomputes on repeated calls.
*/
export declare function baseRPackages(rVersion?: string): readonly string[];
/**
* The base-R package that exports `name` (e.g. `sd` yields `stats`, `plot` yields `base`), or `undefined`.
* Backed by the bundle-time store, so it needs no loaded database and no runtime resolution: the
* export-to-package index is inverted from {@link RBasePackageStore.exportsByPackage} once on first use.
* Base primitives/internals and base data constants (`is.na`, `.Machine`, ...) are not in the sigdb
* export list, so they are answered from {@link RBasePrimitives} and owned by `base`.
*/
export declare function baseRExportOwner(name: string): string | undefined;
/** whether `name` is an R-core / base package at the assumed R version (see {@link baseRPackages}). */
export declare function isBaseRPackage(name: string, rVersion?: string): boolean;