Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No more stringsAsFactors #664

Merged
merged 5 commits into from
Oct 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
# pins (development version)

## Breaking changes

* Changed `type = "csv"` to use R's default value for `stringsAsFactors` i.e.
`FALSE` (#664).

## Other improvements

* Added vignette describing how to manage custom formats (#631, @ijlyttle).

* Improved error message for `pin_versions()` (#657).


# pins 1.0.3

* The `arrow` package is now suggested, rather than imported (#644, @jonthegeek).
Expand Down
4 changes: 3 additions & 1 deletion R/pin-read-write.R
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ object_write <- function(x, path, type = "rds") {
json = jsonlite::write_json(x, path, auto_unbox = TRUE),
arrow = write_arrow(x, path),
pickle = abort("'pickle' pins not supported in R"),
joblib = abort("'joblib' pins not supported in R"),
csv = utils::write.csv(x, path, row.names = FALSE),
qs = write_qs(x, path)
)
Expand Down Expand Up @@ -183,7 +184,8 @@ object_read <- function(meta) {
json = jsonlite::read_json(path, simplifyVector = TRUE),
arrow = read_arrow(path),
pickle = abort("'pickle' pins not supported in R"),
csv = utils::read.csv(path, stringsAsFactors = TRUE),
joblib = abort("'joblib' pins not supported in R"),
csv = utils::read.csv(path),
qs = read_qs(path),
file = abort(c(
"Pin does not declare file type so can't be automatically read",
Expand Down