Description Usage Arguments Details
View source: R/additionalFunctions.R
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
1 | SubsetWithAtributes(Document, vector)
|
Document |
Document that we want to subset |
vector |
The vector that provides the subsetting, like |
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.