Skip to content

Commit 077bce8

Browse files
committed
Edited warning for stepsize exceeding dating range
1 parent aa4edde commit 077bce8

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

R/datplot_utility.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ create.sub.objects <- function(DAT_mat, stepsize) {
173173
if (any(diffs < stepsize)) {
174174
diffs <- diffs[diffs < stepsize]
175175
warning(paste("stepsize is larger than the range of the closest dated object at Index = ",
176-
paste(which(diffs < stepsize), collapse = ", "), "). Using mean as year.", sep = ""))
176+
paste(which(diffs < stepsize), collapse = ", "), "). For information see documentation of get.step.sequence().", sep = ""))
177177
}
178178

179179
for (i in 1:nrow(DAT_mat)) {

tests/testthat/test-datsteps.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ testdf <- create.testing.df()
33

44
test_that("error for wrong value of stepsize", {
55
expect_error(datsteps(testdf, stepsize = "test"))
6+
expect_warning(datsteps(testdf, stepsize = 25))
67
})

0 commit comments

Comments
 (0)