Description Usage Arguments Details See Also Examples
View source: R/testDataSource.R
Example implementation of the data source functions as a coherent data source. This one
simply generates random synthetic data that conform to the formats required by MeterDataClass
and WeatherClass
, returning valid, but meaningless data for all calls.
1 | TestData(n = 100)
|
n |
Number of meters for the data source to provide synthetic data for: determines
the return values for functions like |
TestData
is instantiated with a certain number of meters to generate data for. It then generates
random data for that number and consumes that data to support the rest of its functions. This class
can be used for examples, learning how data sources work, and providing data for tests of feature algorithms
and meter data related classes.
1 2 3 4 5 6 | ## Not run:
DATA_SOURCE = TestData(n=100)
idList = DATA_SOURCE$getIds()
dataMatrix = DATA_SOURCE$getAllData()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.