Skip to content

Commit 7c636a7

Browse files
author
admin
committed
Took out print statement and clarified error message
1 parent 648ee62 commit 7c636a7

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

R/slide.R

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -141,22 +141,12 @@ epi_slide = function(x, f, ..., n = 7, ref_time_values,
141141
}
142142

143143
# Now set up starts and stops for sliding/hopping
144-
time_range = range(unique(x$time_value)) #%%
145-
print(time_range[1])
146-
print(time_range[2])
147-
print(ref_time_values - before_num)
144+
time_range = range(unique(x$time_value))
148145
starts = in_range(ref_time_values - before_num, time_range)
149-
#print(ref_time_values)
150-
print(starts)
151-
#print(length(starts))
152-
#class(starts)
153146
stops = in_range(ref_time_values + after_num, time_range)
154-
print(stops)
155-
print(before_num)
156-
print(after_num)
157147

158148
if(length(starts) == 0 | length(stops) == 0){
159-
Abort("The starting and/or stopping times for sliding are out of bounds with respect to the range of times in your data. Check the values used for ref_time_values and align (or before if that was specified instead).")
149+
Abort("The starting and/or stopping times for sliding are out of bounds with respect to the range of times in your data. Check your settings for ref_time_values and align (and before, if specified).")
160150
}
161151

162152
# Symbolize new column name

0 commit comments

Comments
 (0)