Skip to content

Commit

Permalink
fix keytime in column names
Browse files Browse the repository at this point in the history
  • Loading branch information
lizihao-anu committed Mar 13, 2024
1 parent c693329 commit 17283c5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions R/read_slf.R
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,13 @@ read_slf_episode <- function(
dev = dev

Check warning on line 157 in R/read_slf.R

View check run for this annotation

Codecov / codecov/patch

R/read_slf.R#L150-L157

Added lines #L150 - L157 were not covered by tests
)

if ("keytime1" %in% col_select) {
if ("keytime1" %in% colnames(data)) {
data <- data %>%
dplyr::mutate(.data$keytime1 = hms::as_hms(.data$keytime1))
dplyr::mutate(keytime1 = hms::as_hms(.data$keytime1))

Check warning on line 162 in R/read_slf.R

View check run for this annotation

Codecov / codecov/patch

R/read_slf.R#L160-L162

Added lines #L160 - L162 were not covered by tests
}
if ("keytime2" %in% col_select) {
if ("keytime2" %in% colnames(data)) {
data <- data %>%
dplyr::mutate(.data$keytime2 = hms::as_hms(.data$keytime2))
dplyr::mutate(keytime2 = hms::as_hms(.data$keytime2))

Check warning on line 166 in R/read_slf.R

View check run for this annotation

Codecov / codecov/patch

R/read_slf.R#L164-L166

Added lines #L164 - L166 were not covered by tests
}

return(data)

Check warning on line 169 in R/read_slf.R

View check run for this annotation

Codecov / codecov/patch

R/read_slf.R#L169

Added line #L169 was not covered by tests
Expand Down

0 comments on commit 17283c5

Please sign in to comment.