Skip to content

Commit

Permalink
Clean up for release
Browse files Browse the repository at this point in the history
  • Loading branch information
gorcha committed Feb 25, 2023
1 parent 742a266 commit f9c2aab
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: haven
Title: Import and Export 'SPSS', 'Stata' and 'SAS' Files
Version: 2.5.1.9000
Authors@R: c(
person("Hadley", "Wickham", , "hadley@rstudio.com", role = c("aut", "cre")),
person("Hadley", "Wickham", , "hadley@posit.co", role = c("aut", "cre")),
person("Evan", "Miller", role = c("aut", "cph"),
comment = "Author of included ReadStat code"),
person("Danny", "Smith", role = "aut"),
Expand Down
17 changes: 9 additions & 8 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
* Ignore invalid SAV timestamp strings (#683).
* Fix compiler warnings (#707).

* The experimental `write_sas()` function has been deprecated (#224). The
sas7bdat file format is complex and undocumented, and as such writing SAS
files is not officially supported by ReadStat. `write_xpt()` should be used
instead - it produces files in the SAS transport format, which has
limitations but will be reliably read by SAS.

* `write_*()` functions gain a new `adjust_tz` argument to allow more control
over time zone conversion for date-time variables (#702). Thanks to @jmobrien
for the detailed issue and feedback.
Expand All @@ -22,14 +28,9 @@
the corresponding UTC value, which will appear different to the user but
preserves the underlying numeric data.

* Fixed issue in `write_*()` functions where invisible return of input data
frame included unintended alteration of date time variables. (@jmobrien, #702)

* The experimental `write_sas()` function has been deprecated (#224). The
sas7bdat file format is complex and undocumented, and as such writing SAS
files is not officially supported by ReadStat. `write_xpt()` should be used
instead - it produces files in the SAS transport format, which has
limitations but will be reliably read by SAS.
* `write_*()` functions previously returned the data frame with minor
alterations made to date-time variables. These functions now invisibly return
the original input data frame unchanged (@jmobrien, #702).

* Fix bug in string variable width calculation that treated `NA` values as width
2. `NA` values are now treated as blanks for width calculations (#699).
Expand Down
2 changes: 1 addition & 1 deletion R/haven-sas.R
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ read_sas <- function(data_file, catalog_file = NULL,
#' @keywords internal
#' @export
write_sas <- function(data, path) {
lifecycle::deprecate_warn("2.6.0", "write_sas()", "write_xpt()")
lifecycle::deprecate_warn("2.5.2", "write_sas()", "write_xpt()")

validate_sas(data)
data_out <- adjust_tz(data)
Expand Down
2 changes: 1 addition & 1 deletion vignettes/datetimes.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ DateTime (number of seconds):
Dates and date times use a difference offset to R:

* SAS: 1960-01-01 (`r -as.integer(as.Date("1960-01-01"))` days)
* Spss: 1582-10-14. (`r -as.integer(as.Date("1582-10-14"))` days)
* SPSS: 1582-10-14. (`r -as.integer(as.Date("1582-10-14"))` days)
* Stata: 1960-01-01. (`r -as.integer(as.Date("1960-01-01"))` days)


Expand Down

0 comments on commit f9c2aab

Please sign in to comment.