https://github.com/cran/foreign
Raw File
Tip revision: 931a7ce9e2d081ec21b8be0353f92b1d3855d2c5 authored by R Core Team on 21 May 2012, 00:00:00 UTC
version 0.8-50
Tip revision: 931a7ce
sas.R
if(!nzchar(Sys.getenv("R_FOREIGN_FULL_TEST"))) q("no")
library("foreign")
setwd(tempdir())
tfile <- "int1982ag.zip"
download.file("ftp://cusk.nmfs.noaa.gov/mrfss/intercept/ag/int1982ag.zip",
              tfile, quiet=TRUE, mode="wb")
zip.file.extract("int1982ag.xpt", tfile)
dfs <- read.xport("int1982ag.xpt")
foo <- dfs$I3_19822
nrow(foo)
stopifnot(nrow(foo) == 3650)
back to top