SubsetWithAtributes: Subsetting Document

Description Usage Arguments Details

View source: R/additionalFunctions.R

Description

If you use a function such as A[vector], it only preserves the names attribute, it doesn't preserve any other attribute. This Function attempts to "fix" that manually, for lack of a better solution, instead of using S3 classes. Therefore, it can be used with other documents.

It subsets the attributes that have the same length as the Document itself and preserve all other attributes with length 0

Usage

1

Arguments

Document

Document that we want to subset

vector

The vector that provides the subsetting, like `[`

Details

Although this function was created with documents in mind, it can work with any R array that holds attributes and has a subsetting `[` function call.


TexExamRandomizer documentation built on May 2, 2019, 3:18 a.m.