Learn R Programming

trackr (version 0.10.7)

ObjFeatureSet: FeatureSet contstructors

Description

Constructors for different typed FeatureSet subclasses. These should only be used when customizing metadata extraction, i.e., in custom makeFeatureSet methods. Not intended to be called directly by end users. Because the arguments listed here unavoidably map to class slots, and because most of them should NOT be set directly even in customization code, they are semi-internal implementation details and are subject to change.

Arguments described as 'Do not manually set' have default values that should be used in virtually all cases. Overriding these in custom makeFeatureSet methods can lead to undefined behavior by the trackr system.

Usage

ObjFeatureSet(
  object,
  code = as.character(parseCode(object)),
  codeinfo = CodeDepends::getInputs(parseCode(code)),
  klass = getTopS3Class(object),
  uniqueid = gen_hash_id(object),
  tags = character(),
  user = unname(Sys.info()["user"]),
  regdate = Sys.time(),
  analysispkg = scrape_descr(),
  analysisfile = .analysisFileOrNA(),
  rstudioproject = .rstudioProjOrNA(),
  fsetklass = "ObjFeatureSet",
  isplot = FALSE,
  generatedin = character(),
  clineargs = commandArgs(),
  resultURI = character(),
  provtable = ProvStoreDF(),
  ...
)

PlotFeatureSet( object, fsetklass = "PlotFeatureSet", package = NA_character_, ... )

GGplotFeatureSet(object, fsetklass = "GGplotFeatureSet", ...)

TrellisFeatureSet(object, fsetklass = "TrellisFeatureSet", ...)

GraphicsFeatureSet(object, fsetklass = "GraphicsFeatureSet", ...)

DFFeatureSet( object, fsetklass = "DFFeatureSet", vars = names(object), varclasses = .makeClassesTab(object), varsummaries = structure(lapply(object, .makeSummaryTable), names = names(object)), nobs = nrow(object), ... )

RmdFeatureSet( rmdfile, outputfile, uniqueid, rmdfileid = gen_hash_id(readLines(rmdfile)), chunks, numouts = length(trackr_backend(objtdb)), numplots = sum(sapply(objrecords, function(x) x$isplot)), titles = "", author = "", textkeywords = character(), codekeywords = character(), outputids = sapply(objrecords, function(x) x$uniqueid, USE.NAMES = FALSE), tags = character(), user = unname(Sys.info()["user"]), regdate = Sys.time(), analysispkg = scrape_descr(), analysisfile = .analysisFileOrNA(), rstudioproject = .rstudioProjOrNA(), fsetklass = "RmdFeatureSet", objrecords = findRecords(".", db = objtdb), objtdb, figurefiles = NA_character_, resultURI = "", ... )

Arguments

object

object to extract metadata from

code

The code which generated the object. Do not manually set

codeinfo

Do not manually set

klass

The class of the object. Do not manually set

uniqueid

The uniqueID for the result. Do not manually set. EVER.

tags

Tags to associate with the object

user

The user who recorded the object. Do not manually set

regdate

The registration date/time. Do not manually set

analysispkg

The analysis R package in which the session was run. Do not manually set

analysisfile

The .R file code was executed from to create the object. Do not manually set

rstudioproject

The RStudio project in which the object was created. Do not manually set

fsetklass

The FeatureSet subclass being created. This should be overridden with custom FeatureSet subclasses

isplot

Is the object a plot. Do not manually set.

generatedin

The uniqueID of a parent result (e.g. an RMD report the object was generated within). Do not manually set

clineargs

The command-line arguments passed to the R session in which the object was recorded. Do not manually set.

resultURI

An optional character value which defines a location within a hierarchical grouping for results tracked by trackr. E.g. '/groups/Becker/HousingData/analysis3'

provtable

A ProvStoreDF object containing "value lineage" provenance information

...

For ObjFeatureSet and RmdFeatureSet, unused. For Other constructors, passed to the parent constructor.

package

The plotting package used to create a plot.

vars

Do not manually set

varclasses

Do not manually set

varsummaries

Do not manually set

nobs

Do not manually set

rmdfile

The (input) RMD file

outputfile

the path to the woven report

rmdfileid

Id associated with the input .Rmd file. Do not manually set. EVER.

chunks

The code and text chunks of the dynamic document

numouts

Do not manually set

numplots

Do not manually set

titles

Do not manually set

author

Do not manually set

textkeywords

Keywords extracted from the text

codekeywords

Keywords extracted from the code

outputids

Do not manually set

objrecords

Do not manually set. EVER.

objtdb

The (temporary) trackerdb where individual displayed outputs were recorded during the weaving process.

figurefiles

image files of plot as figures for woven report. Do not manually set.

Value

An object of a class that inherits from FeatureSet