R version 3.2.3 (2015-12-10) -- "Wooden Christmas-Tree" Copyright (C) 2015 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- c(104.93,105.68,106.93,107.29,107.25,106.74,106.44,106.6,107.26,107.35,107.22,106.99,106.87,107.68,108.9,109.48,109.57,109.03,109.58,109.76,110.15,110.2,109.86,109.58,109.52,110.35,111.61,112.06,111.9,111.36,112.09,112.24,112.7,113.36,112.9,112.74,112.7,113.66,114.87,114.97,115,114.57,115.54,115.39,115.46,115.13,114.56,114.62,114.37,114.86,115.82,116.35,115.95,115.64,116.58,116.5,116.48,116.34,115.65,115.42) > par3 = 'additive' > par2 = 'Triple' > par1 = '12' > par1 <- as.numeric(par1) > if (par2 == 'Single') K <- 1 > if (par2 == 'Double') K <- 2 > if (par2 == 'Triple') K <- par1 > nx <- length(x) > nxmK <- nx - K > x <- ts(x, frequency = par1) > if (par2 == 'Single') fit <- HoltWinters(x, gamma=F, beta=F) > if (par2 == 'Double') fit <- HoltWinters(x, gamma=F) > if (par2 == 'Triple') fit <- HoltWinters(x, seasonal=par3) Error in HoltWinters(x, seasonal = par3) : optimization failure Execution halted