Skip to content

Commit

Permalink
bugfix if only one wave is given
Browse files Browse the repository at this point in the history
  • Loading branch information
buddekai committed Feb 21, 2023
1 parent c44104a commit 946d0c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/plotWaveforms.R
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ plotWaveforms <- function(input_data = NULL,
if(plot_waveforms == "all"){
waveforms <- unique(input_data$ID)
}else if(plot_waveforms == "one"){
waveforms <- unique(input_data$ID)[
floor(length(unique(input_data$ID))/2)]
which_wave <- max(floor(length(unique(input_data$ID))/2), 1)
waveforms <- unique(input_data$ID)[which_wave]
}else{
waveforms <- NA
}
Expand Down

0 comments on commit 946d0c5

Please sign in to comment.