Skip to content

Commit

Permalink
Add sample data and examples
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley committed Jun 10, 2016
1 parent f033c37 commit 86a92a6
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 0 deletions.
9 changes: 9 additions & 0 deletions R/haven.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ NULL
#' Variable labels are stored in the "label" attribute of each variable.
#' It is not printed on the console, but the RStudio viewer will show it.
#' @export
#' @examples
#' path <- system.file("examples", "iris.sas7bdat", package = "haven")
#' read_sas(path)
read_sas <- function(b7dat, b7cat = NULL, encoding = NULL) {
if (is.null(encoding)) {
encoding <- ""
Expand Down Expand Up @@ -51,6 +54,9 @@ read_sas <- function(b7dat, b7cat = NULL, encoding = NULL) {
#' It is not printed on the console, but the RStudio viewer will show it.
#' @name read_spss
#' @examples
#' path <- system.file("examples", "iris.sav", package = "haven")
#' read_sav(path)
#'
#' tmp <- tempfile(fileext = ".sav")
#' write_sav(mtcars, tmp)
#' read_sav(tmp)
Expand Down Expand Up @@ -106,6 +112,9 @@ read_spss <- function(file, user_na = FALSE) {
#' It is not printed on the console, but the RStudio viewer will show it.
#' @export
#' @examples
#' path <- system.file("examples", "iris.dta", package = "haven")
#' read_dta(path)
#'
#' tmp <- tempfile(fileext = ".dta")
#' write_dta(mtcars, tmp)
#' read_dta(tmp)
Expand Down
Binary file added inst/examples/iris.dta
Binary file not shown.
Binary file added inst/examples/iris.sas7bdat
Binary file not shown.
Binary file added inst/examples/iris.sav
Binary file not shown.
3 changes: 3 additions & 0 deletions man/read_dta.Rd

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

4 changes: 4 additions & 0 deletions man/read_sas.Rd

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

3 changes: 3 additions & 0 deletions man/read_spss.Rd

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

0 comments on commit 86a92a6

Please sign in to comment.