-
Notifications
You must be signed in to change notification settings - Fork 2
Tutorial: 2.1. Load Benchmark
As stated before, there are several ways to load your data into the benchmarkVis package.
If you have a csv/json/Rds file which is structured as stated in 1. Data Structure you can simply use following command to load your benchmark result:
csvImport("PATH.TO.CSV.File")or
jsonImport("PATH.TO.JSON.File")or
rdsImport("PATH.TO.RDS.File")After the import a structure check will be run to see if everything is correct.
To import a benchmark result created with a package for which a wrapper is provided you can simply use the corresponding method. One example (in this case the microbenchmark wrapper) would be:
library(microbenchmark)
x = runif(100)
benchmark = microbenchmark(sqrt(x), x ^ 0.5)
table = useMicrobenchmarkWrapper(benchmark)You can get a full list of all wrappers with:
listWrappers()This will result in something like this:
"useMicrobenchmarkFileWrapper"
"useMicrobenchmarkWrapper"
"useMlrBenchmarkFileWrapper"
"useMlrBenchmarkWrapper"
"useMlrTuningFileWrapper"
"useMlrTuningWrapper"
"useRbenchmarkFileWrapper"
"useRbenchmarkWrapper"
All the *FileWrapper methods are used with an RDS file.
Also for this import strategy a structure check will be executed.
If you created your data table directly in R and already checked the structure with
checkStructure(data.table)you are ready to go.