hashmap_vs_vector_test: test the speed of the hashmap and vector methods of looking...

Description Usage Arguments

Description

test the speed of the hashmap and vector methods of looking up stats several possible syntax options for the vector lookup are tested run a benchmark that compares the speed and accuracy of hashmap and named vectors for the needs of nflscrapR nfl_stat_map is used once, in a situation where it only looks up scalar values that are always hits in nflscrapR, the stats are force cast to character beforehand so included a test that shows the cost of doing so as well as a test where the cost of doing so is not included the == notation matches functionality only under those conditions, while match should perform in the event of a non match or you want to look up a vector of stat ids.

Usage

1
hashmap_vs_vector_test(number_of_trials = 10000)

Arguments

number_of_trials

number of microbenchmark trials to run. 10000 is the default


bballmike823/nflscrapRvalidation documentation built on May 5, 2019, 11:06 p.m.