Skip to content

Commit

Permalink
Changed intervals' year_range to event_range and changed print output…
Browse files Browse the repository at this point in the history
… to close #103
  • Loading branch information
brews committed May 18, 2017
1 parent 1d9740f commit 5ccc0ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/intervals.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ intervals <- function(comp, densfun="weibull") {
x$kstest <- do.call(stats::ks.test, kstest_args)
x$shapirotest <- stats::shapiro.test(x$intervals)
x$comp_name <- series_names(comp)
x$year_range <- year_range(comp)
x$event_range <- range(unlist(get_event_years(comp)))
x
}

Expand Down Expand Up @@ -152,7 +152,7 @@ print.intervals <- function(x, ...) {
cat(strwrap("=================", prefix = "\t"), sep = "\n")
cat("\n")
cat(paste0("Composite name: ", x$comp_name, "\n"))
cat(paste0("Analysis period: ", x$year_range[1], " to ", x$year_range[2], "\n"))
cat(paste0("Analysis events range: ", x$event_range[1], " to ", x$event_range[2], "\n"))
cat("\n")
cat(paste0("\tTotal intervals: ", length(x$intervals), "\n"))
cat(paste0("\tMean interval: ", round(mean(x), 1), "\n"))
Expand Down

0 comments on commit 5ccc0ae

Please sign in to comment.