Description Usage Arguments Value Examples
View source: R/plotFunctions.R
Specific plotting method for hpiindex objects
1 2 |
x |
Object to plot of class 'hpiindex“ |
show_imputed |
default = FALSE; highlight the imputed points |
smooth |
default = FALSE; plot the smoothed index |
... |
Additional Arguments |
'plotindex' object inheriting from a ggplot object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | # Load data
data(ex_sales)
# With a raw transaction data.frame
rt_data <- rtCreateTrans(trans_df = ex_sales,
prop_id = 'pinx',
trans_id = 'sale_id',
price = 'sale_price',
periodicity = 'monthly',
date = 'sale_date')
# Create model object
hpi_model <- hpiModel(model_type = 'rt',
hpi_df = rt_data,
estimator = 'base',
log_dep = TRUE)
# Create Index
hpi_index <- modelToIndex(hpi_model,
max_period = 84)
# Make Plot
plot(hpi_index)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.