veris.sample: sample data file to test/explore verisr

veris.sampleR Documentation

sample data file to test/explore verisr

Description

This is a collection of the 1000 most complete incidents within the VCDB database. See the example below on how the data was generated.

Examples

## Not run: 
# set vcdbdir and schema file

vcdb <- json2veris(vcdbdir, schemafile, progressbar = T)
mycols <- getlogical(vcdb)
testdata <- vcdb[order(-rowSums(vcdb[, mycols, with=F]))]
got.action <- as.vector(testdata[ ,'action.Unknown', with=F] == F)
got.actor <- as.vector(testdata[ ,'actor.Unknown', with=F] == F)
got.asset <- as.vector(testdata[ ,'asset.assets.variety.Unknown', with=F] == F)
veris.sample <- head(testdata[got.actor & got.action & got.asset, ], 1000)
# cast this into a verisr object for future use.
class(veris.sample) <- c("verisr", "data.table", "data.frame")
save(veris.sample, file="data/veris.sample.rda", compress="xz")

## End(Not run)

vz-risk/verisr documentation built on Aug. 5, 2023, 4:34 a.m.