R/ImportSPSS_m0.R

Defines functions ImportSPSS

Documented in ImportSPSS

#' Read SPSS process data
#'
#' This is a simple function that, by default, reads an SPSS data file
#' and save it as a data frame. It is essentially a wrapper for
#' foreign::read.spss with arguments common to log file datasets.
#'
#' @param filename character string: the name of the file or URL to read.
#'
#' @return This function returns a data frame.
ImportSPSS <- function(filename) {
  data <- foreign::read.spss(
    file = filename, use.value.labels = FALSE,
    to.data.frame = TRUE, strip.white = TRUE
  )
  return(data)
}

Try the LOGAN package in your browser

Any scripts or data that you put into this service are public.

LOGAN documentation built on Oct. 25, 2022, 9:08 a.m.