Skip to content

Commit

Permalink
Pass stringsAsFactors = FALSE correctly
Browse files Browse the repository at this point in the history
Co-Authored-By: Damiano Oldoni <damiano.oldoni@inbo.be>
  • Loading branch information
peterdesmet and damianooldoni committed Sep 19, 2024
1 parent 63e98f9 commit b28af6c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion R/read_resource.R
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ read_resource <- function(package, resource_name, col_select = NULL) {

# Read data from data
} else if (resource$read_from == "data") {
df <- dplyr::bind_rows(resource$data)
df <- do.call(
function(...) rbind.data.frame(..., stringsAsFactors = FALSE),
resource$data
)
df <- dplyr::as_tibble(df)

# Read data from path(s)
} else if (resource$read_from == "path" || resource$read_from == "url") {
Expand Down

0 comments on commit b28af6c

Please sign in to comment.