Skip to content

Commit

Permalink
fix tibble 3.0 issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sebkopf committed Apr 7, 2020
1 parent 9bb95a8 commit 459a1f4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: isoreader
Title: Read IRMS data files
Description: R interface to IRMS (isotope ratio mass spectrometry) file formats typically used in stable isotope geochemistry.
Version: 1.1.4
Version: 1.1.5
Authors@R: person("Sebastian", "Kopf", email = "sebastian.kopf@colorado.edu", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-2044-0201"))
URL: https://github.com/isoverse/isoreader
BugReports: https://github.com/isoverse/isoreader/issues
Expand All @@ -15,7 +15,7 @@ Imports:
glue,
tidyselect (>= 1.0.0),
vctrs,
tibble,
tibble (>= 3.0.0),
dplyr (>= 0.8.4),
tidyr (>= 1.0.0),
stringr,
Expand Down
2 changes: 1 addition & 1 deletion R/isoread.R
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ iso_read_files <- function(paths, root, supported_extensions, data_structure,

# bring files into the correct order after potential parallel processing jumble
indices <-
tibble(path = purrr::map_chr(iso_files, ~.x$file_info$file_path), idx = 1:length(path)) %>%
tibble(path = purrr::map_chr(iso_files, ~.x$file_info$file_path) %>% unname(), idx = 1:length(path)) %>%
dplyr::left_join(files, by = "path") %>%
dplyr::arrange(file_n) %>%
dplyr::pull(idx)
Expand Down
11 changes: 8 additions & 3 deletions R/isoread_isodat.R
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,14 @@ extract_isodat_old_sequence_line_info <- function(ds) {
by = "n"
)

# in file object
if (nrow(file_info) > 0)
ds$file_info[file_info$label] <- file_info$value
# transfer to
if (nrow(file_info) > 0) {
ds$file_info <-
dplyr::mutate(
ds$file_info,
!!!rlang::set_names(file_info$value, file_info$label)
)
}

return(ds)
}
Expand Down

0 comments on commit 459a1f4

Please sign in to comment.