PlotTimeSeries <- function(var, colour_along = NULL, style_along = NULL,
                           extremes_along = NULL, boxwhisker_along = NULL, 
                           group_along = NULL, conf_int_along = NULL, 
                           dates = NULL, sdates = NULL, freq = 12, 
                           dateini = NULL, monini = NULL, yearini = NULL, 
                           group_along_memb = TRUE, group_along_ensmean = TRUE,
                           show_sig_lev = TRUE, show_conf_int = TRUE,
                           title = NULL, xtitle = NULL, ytitle = NULL,
                           legend = TRUE, multiInOne = FALSE,
                           fileout = NULL) {
  #-------------------------------------
  # Check parameters and process them
  #-------------------------------------
  # Check var
  #----------

  # Check 'along' arguments
  #------------------------
  if (!is.null(colour_along) || !is.numeric(colour_along) || !is.character(colour_along)) {
    stop("'colour_along' must be a character string or a number")
  }

  if (!is.null(style_along) || !is.numeric(style_along) || !is.character(style_along)) {
    stop("'style_along' must be a character string or a number")
  }
  
  if (!is.null(extremes_along) || !is.numeric(extremes_along) || !is.character(extremes_along)) {
    stop("'extremes_along' must be a character string or a number")
  }
  
  if (!is.null(boxwhisker_along) || !is.numeric(boxwhisker_along) || !is.character(boxwhisker_along)) {
    stop("'boxwhisker_along' must be a character string or a number")
  }
  
  if (!is.null(group_along) || !is.numeric(group_along) || !is.character(group_along)) {
    stop("'group_along' must be a character string or a number")
  }
  
  if (!is.null(conf_int_along) || !is.numeric(conf_int_along) || !is.character(conf_int_along)) {
    stop("'conf_int_along' must be a character string or a number")
  }
  
  if (is.null(colour_along) && is.null(style_along) && is.null(extremes_along) && is.null(boxwhisker_along) && is.null(group_along) && is.null(conf_int_along)) {
    ## Process var to guess best approach
  }

  # Check graphical parameters
  #---------------------------
  if (is.null(title)) {
    ## process var
  } else if (!is.character(title)) {
    stop("'title' must be a character string")
  }

  if (is.null(xtitle)) {
    ## process var
  } else if (!is.character(xtitle)) {
    stop("'xtitle' must be a character string")
  }
  
  if (is.null(ytitle)) {
    ## process var
  } else if (!is.character(ytitle)) {
    stop("'ytitle' must be a character string")
  }

  # Check device
  #-----------------------------
  if (!is.character(fileout) && !is.null(fileout)) {
    stop("Parameter 'fileout' must be a character string.")
  }

  #-------------------------------------
  # Plot
  #-------------------------------------

  #-------------------------------------
  # Return ggplot object or save to file
  #-------------------------------------
}

