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

improve NA handling #closes #300 #301

Merged
merged 3 commits into from
Aug 6, 2022
Merged

improve NA handling #closes #300 #301

merged 3 commits into from
Aug 6, 2022

Conversation

JanMarvin
Copy link
Owner

@JanMarvin JanMarvin commented Aug 6, 2022

Write na.strings with write_xlsx() and read na.strings() and na.numbers().

> df <- data.frame(
+   num = c(1, -99, 3, NA_real_),
+   char = c("hello", "99", "3", NA_character_)
+ )
> 
> test <- temp_xlsx()
> write_xlsx(df, file = test, na.strings = "N/A")
> 
> read_xlsx(test, na.strings = "N/A", na.numbers = -99)
  num  char
2   1 hello
3  NA    99
4   3     3
5  NA  <NA>

@JanMarvin JanMarvin merged commit 8cdc3de into main Aug 6, 2022
@JanMarvin JanMarvin deleted the gh_issue_300 branch August 6, 2022 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant