Skip to content

Commit

Permalink
declare fill arg to resolve tidyr seperate parsing warning
Browse files Browse the repository at this point in the history
  • Loading branch information
parmsam-pfizer committed Oct 3, 2023
1 parent b44d4f8 commit 700fe00
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion R/read_log_file.R
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ parse_log <- function(nested_log) {
tidyr::separate(".",
sep = "\\: ",
into = c("Variable", "Value"),
extra = "merge"
extra = "merge",
fill = "right"
)
}

Expand All @@ -186,6 +187,7 @@ parse_log <- function(nested_log) {
sep = "\\s",
into = c("setting", "value"),
extra = "merge",
fill = "right"
) %>%
dplyr::mutate(dplyr::across(tidyselect::where(is.character), stringr::str_trim))

Expand Down Expand Up @@ -218,6 +220,7 @@ parse_log <- function(nested_log) {
sep = "\\s",
into = c("setting", "value"),
extra = "merge",
fill = "right"
) %>%
dplyr::mutate(dplyr::across(tidyselect::where(is.character), stringr::str_trim))
}
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-parse.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ test_that("read_log_file will parse a logrx log file and create the necessary ob

# check that the log file can be parsed
parsedFile <- read_log_file(filePath)
''

expect_length(parsedFile, 9)
expect_named(
parsedFile,
Expand Down

0 comments on commit 700fe00

Please sign in to comment.