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

Description Examples

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## 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)

jayjacobs/verisr documentation built on May 18, 2019, 5:57 p.m.