Skip to content

Commit

Permalink
fixed copy paste error in single sheet read
Browse files Browse the repository at this point in the history
  • Loading branch information
collinschwantes committed Jun 18, 2024
1 parent 0d7be21 commit 96ac2fd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
4 changes: 2 additions & 2 deletions R/read_googlesheets.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ read_googlesheets <-
sheet_names <- rlang::set_names(sheet_names, sheet_names)
dat <-
purrr::map(sheet_names,
\(x){
function(x){
df <- googlesheets4::range_read(
ss = ss,
sheet = x,
Expand Down Expand Up @@ -63,7 +63,7 @@ read_googlesheets <-

if(add_primary_key_field){
#ss_sheet_rownum
row_ids <- paste(ss,x,1:nrow(dat),sep = "_")
row_ids <- paste(ss,sheet,1:nrow(dat),sep = "_")

dat <- dat %>%
dplyr::mutate({{primary_key}} := {{row_ids}})
Expand Down
15 changes: 13 additions & 2 deletions man/read_googlesheets.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 96ac2fd

Please sign in to comment.