tests/testthat/test-manipulate_initial_data.R

context("manipulate_initial_data")

test_that("manipulate_initial_data works", {
	# skip_on_cran()
	expect_type(aggregate_transactions(investor, unit = "1 month"), "list")
	expect_type(reduce_transactions(investor, unit = "1 month"), "list")
	expect_type(clean_transactions(investor, unit = "1 month"), "list")
	expect_type(clean_transactions(investor, unit = "1 month", reduce = TRUE), "list")
	expect_type(aggregate_market_prices(marketprices, unit = "1 month"), "list")
	expect_type(subset_market_prices(marketprices, investor$asset[1], investor$datetime), "list")
	expect_type(subset_market_prices(marketprices, investor$asset[1], investor$datetime, unit = "1 secs"), "list")
	expect_type(generate_data(investor, marketprices, investor_name = "ABC"), "list")
	expect_type(generate_data(investor, marketprices, investor_name = "ABC", subset = TRUE), "list")
	expect_type(generate_data(investor, marketprices, investor_name = "ABC", unit = "1 secs"), "list")
})

Try the dispositionEffect package in your browser

Any scripts or data that you put into this service are public.

dispositionEffect documentation built on May 30, 2022, 9:05 a.m.