setwd(file.path(.path.package("SASxport"),"data"))
## Get information on a local file
lookup.xport("Alfalfa.xpt")
## Or read a copy of test2.xpt available on the web:
host <- 'http://biostat.mc.vanderbilt.edu'
path <- '/cgi-bin/viewvc.cgi/*checkout*/Hmisc/trunk/tests/test2.xpt'
url <- paste(host,path,sep="")
w <- lookup.xport(url)
# display the information (calls 'print.lookup.xport')
w
# names of data sets
names(w)
# names of variables within data sets
w$Z$name
# use summary
wS <- summary(w)
wS # same display
# variable names within all data sets
wS$nameRun the code above in your browser using DataLab