Nothing
test_that("extract_timeseries_var() returns the expected data frame", {
test_df <- data.frame(`var[1]` = rep(0, 2),
`var[2]` = rep(1, 2),
check.names = FALSE)
expected_df <- data.frame(iter = rep(1:2, 2),
time = rep(1:2, each = 2),
variable = "var",
value = c(0, 0, 1, 1))
expect_equal(extract_timeseries_var("var", test_df), expected_df)
})
test_that("extract_timeseries_stock() returns the expected data frame", {
test_df <- data.frame(`yhat[1,2]` = rep(0, 2),
`yhat[2,2]` = rep(1, 2),
check.names = FALSE)
expected_df <- data.frame(iter = rep(1:2, 2),
time = rep(1:2, each = 2),
stock = "S2",
value = c(0, 0, 1, 1))
test_stocks <- c("S1", "S2")
expect_equal(extract_timeseries_stock("S2", test_df, test_stocks, "yhat"),
expected_df)
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.