Thread: [R-gregmisc-users] SF.net SVN: r-gregmisc:[1456] trunk/SASxport/man
Brought to you by:
warnes
From: <wa...@us...> - 2010-11-12 02:45:45
|
Revision: 1456 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1456&view=rev Author: warnes Date: 2010-11-12 02:45:39 +0000 (Fri, 12 Nov 2010) Log Message: ----------- Update Greg's email address Modified Paths: -------------- trunk/SASxport/man/SASxport-package.Rd trunk/SASxport/man/read.xport.Rd trunk/SASxport/man/toSAS.Rd trunk/SASxport/man/write.xport.Rd Modified: trunk/SASxport/man/SASxport-package.Rd =================================================================== --- trunk/SASxport/man/SASxport-package.Rd 2010-11-12 02:41:05 UTC (rev 1455) +++ trunk/SASxport/man/SASxport-package.Rd 2010-11-12 02:45:39 UTC (rev 1456) @@ -52,7 +52,7 @@ } \author{ Unless otherwise noted, the contents of this package were written by - Gregory R. Warnes \email{gr...@ra...}, are + Gregory R. Warnes \email{gr...@wa...}, are Copyright (c) 2007 by Random Technologies LLC \cr \url{http://random-technologies-llc.com}, and are provided under the terms of the GNU General Public License, version 2.0 or later. @@ -75,7 +75,7 @@ \url{http://metruminstitute.org}. } \section{Maintainer}{ - Gregory R. Warnes \email{gr...@ra...} + Gregory R. Warnes \email{gr...@wa...} } \section{Support}{ Technical support contracts and other services for R, this package, Modified: trunk/SASxport/man/read.xport.Rd =================================================================== --- trunk/SASxport/man/read.xport.Rd 2010-11-12 02:41:05 UTC (rev 1455) +++ trunk/SASxport/man/read.xport.Rd 2010-11-12 02:45:39 UTC (rev 1456) @@ -94,7 +94,7 @@ variables having customized label formats will be converted to \code{factor} objects with appropriate labels. } -\author{ Gregory R. Warnes \email{gr...@ra...} +\author{ Gregory R. Warnes \email{gr...@wa...} based on \code{Hmisc:::sasxport.get} by Frank E. Harrell, Jr.} \section{Note}{ This code provides a subset of the functionality of the Modified: trunk/SASxport/man/toSAS.Rd =================================================================== --- trunk/SASxport/man/toSAS.Rd 2010-11-12 02:41:05 UTC (rev 1455) +++ trunk/SASxport/man/toSAS.Rd 2010-11-12 02:45:39 UTC (rev 1456) @@ -44,7 +44,7 @@ A vector of type "character" or of type "numeric", with an attribute named "label" containing the SAS format specification. } -\author{ Gregory R. Warnes \email{gr...@ra...} } +\author{ Gregory R. Warnes \email{gr...@wa...} } \seealso{ \code{\link{write.xport}}, \code{\link{read.xport}}, Modified: trunk/SASxport/man/write.xport.Rd =================================================================== --- trunk/SASxport/man/write.xport.Rd 2010-11-12 02:41:05 UTC (rev 1455) +++ trunk/SASxport/man/write.xport.Rd 2010-11-12 02:45:39 UTC (rev 1456) @@ -68,7 +68,7 @@ Data Set in SAS Transport (XPORT) Format'' available at \url{http://ftp.sas.com/techsup/download/technote/ts140.html}. } -\author{Gregory R. Warnes \email{gr...@ra...}} +\author{Gregory R. Warnes \email{gr...@wa...}} \note{ This package was created by Random Technologies LLC \url{http://random-technologies-llc.com} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2012-06-28 02:24:56
|
Revision: 1583 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1583&view=rev Author: warnes Date: 2012-06-28 02:24:49 +0000 (Thu, 28 Jun 2012) Log Message: ----------- Remove references to Random Technologies. Modified Paths: -------------- trunk/SASxport/man/label.Rd trunk/SASxport/man/write.xport.Rd Modified: trunk/SASxport/man/label.Rd =================================================================== --- trunk/SASxport/man/label.Rd 2012-06-28 02:13:00 UTC (rev 1582) +++ trunk/SASxport/man/label.Rd 2012-06-28 02:24:49 UTC (rev 1583) @@ -49,8 +49,10 @@ \code{"SASiformat"} attribute of x, if any; otherwise, the value provided by \code{default}. } -\author{Gregory R. Warnes \email{gr...@ra...} based - on code from the \code{Hmisc} library by Frank E. Harrell, Jr.} +\author{ + Gregory R. Warnes \email{gr...@wa...} based on code from the + \code{Hmisc} library by Frank E. Harrell, Jr. ] +} %\seealso{ %} \examples{ Modified: trunk/SASxport/man/write.xport.Rd =================================================================== --- trunk/SASxport/man/write.xport.Rd 2012-06-28 02:13:00 UTC (rev 1582) +++ trunk/SASxport/man/write.xport.Rd 2012-06-28 02:24:49 UTC (rev 1583) @@ -70,14 +70,8 @@ } \author{Gregory R. Warnes \email{gr...@wa...}} \note{ - This package was created by Random Technologies LLC - \url{http://random-technologies-llc.com} - with partial funding by Metrum Institute + This package was created with partial funding by Metrum Institute \url{http://metruminstitute.org}. - - Technical support contracts for this and other R packages are available - from Random Technologies LLC \url{http://random-technologies-llc.com}. - } \seealso{ \code{\link{toSAS}}, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2013-03-24 05:41:56
|
Revision: 1648 http://sourceforge.net/p/r-gregmisc/code/1648 Author: warnes Date: 2013-03-24 05:41:53 +0000 (Sun, 24 Mar 2013) Log Message: ----------- Replace obsolete use of .path.package() with path.package() Modified Paths: -------------- trunk/SASxport/man/Alfalfa.Rd trunk/SASxport/man/lookup.xport.Rd Modified: trunk/SASxport/man/Alfalfa.Rd =================================================================== --- trunk/SASxport/man/Alfalfa.Rd 2013-03-24 05:21:31 UTC (rev 1647) +++ trunk/SASxport/man/Alfalfa.Rd 2013-03-24 05:41:53 UTC (rev 1648) @@ -30,7 +30,7 @@ # go were the data is... here <- getwd() -setwd(file.path(.path.package("SASxport"),"extdata")) +setwd(file.path(path.package("SASxport"),"extdata")) # Description of the file contents lookup.xport("Alfalfa.xpt") Modified: trunk/SASxport/man/lookup.xport.Rd =================================================================== --- trunk/SASxport/man/lookup.xport.Rd 2013-03-24 05:21:31 UTC (rev 1647) +++ trunk/SASxport/man/lookup.xport.Rd 2013-03-24 05:41:53 UTC (rev 1648) @@ -45,7 +45,7 @@ } \examples{ \dontshow{ -setwd(file.path(.path.package("SASxport"),"extData")) +setwd(file.path(path.package("SASxport"),"extData")) } ## Get information on a local file lookup.xport("Alfalfa.xpt") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2013-05-11 20:06:58
|
Revision: 1652 http://sourceforge.net/p/r-gregmisc/code/1652 Author: warnes Date: 2013-05-11 20:06:55 +0000 (Sat, 11 May 2013) Log Message: ----------- Replace file.path(path.package(...)) with system.file(...) Modified Paths: -------------- trunk/SASxport/man/Alfalfa.Rd trunk/SASxport/man/lookup.xport.Rd Modified: trunk/SASxport/man/Alfalfa.Rd =================================================================== --- trunk/SASxport/man/Alfalfa.Rd 2013-05-11 20:05:57 UTC (rev 1651) +++ trunk/SASxport/man/Alfalfa.Rd 2013-05-11 20:06:55 UTC (rev 1652) @@ -30,7 +30,7 @@ # go were the data is... here <- getwd() -setwd(file.path(path.package("SASxport"),"extdata")) +setwd(system.file("extdata",package="SASxport")) # Description of the file contents lookup.xport("Alfalfa.xpt") Modified: trunk/SASxport/man/lookup.xport.Rd =================================================================== --- trunk/SASxport/man/lookup.xport.Rd 2013-05-11 20:05:57 UTC (rev 1651) +++ trunk/SASxport/man/lookup.xport.Rd 2013-05-11 20:06:55 UTC (rev 1652) @@ -45,7 +45,8 @@ } \examples{ \dontshow{ -setwd(file.path(path.package("SASxport"),"extData")) +setwd(system.file("extdata", package="SASxport")) + } ## Get information on a local file lookup.xport("Alfalfa.xpt") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2013-10-09 18:15:11
|
Revision: 1718 http://sourceforge.net/p/r-gregmisc/code/1718 Author: warnes Date: 2013-10-09 18:15:08 +0000 (Wed, 09 Oct 2013) Log Message: ----------- Issue: URL test2.xpt file has moved. Solution: (1) Use local copy of file for executed examples, (2) update URL for displayed examples. Modified Paths: -------------- trunk/SASxport/man/lookup.xport.Rd trunk/SASxport/man/read.xport.Rd Modified: trunk/SASxport/man/lookup.xport.Rd =================================================================== --- trunk/SASxport/man/lookup.xport.Rd 2013-10-09 17:19:31 UTC (rev 1717) +++ trunk/SASxport/man/lookup.xport.Rd 2013-10-09 18:15:08 UTC (rev 1718) @@ -44,21 +44,21 @@ for \code{\link[foreign]{lookup.xport}}. } \examples{ -\dontshow{ -setwd(system.file("extdata", package="SASxport")) -} -## Get information on a local file -lookup.xport("Alfalfa.xpt") +## Get information about a local file +alfFile <- system.file('extdata', 'Alfalfa.xpt', package='SASxport') +lookup.xport(alfFile) -## Or read a copy of test2.xpt available on the web: +## Read a copy of test2.xpt available on the web: \dontrun{ -host <- 'http://biostat.mc.vanderbilt.edu' -path <- '/cgi-bin/viewvc.cgi/*checkout*/Hmisc/trunk/tests/test2.xpt' -url <- paste(host,path,sep="") - +url <- 'http://biostat.mc.vanderbilt.edu/wiki/pub/Main/Hmisc/test2.xpt' w <- lookup.xport(url) +} +## Or use the local copy... +testFile <- system.file('extdata', 'test2.xpt', package="SASxport") +w <- lookup.xport(testFile) + # display the information (calls 'print.lookup.xport') w @@ -74,7 +74,6 @@ # variable names within all data sets wS$name -} } \keyword{file} Modified: trunk/SASxport/man/read.xport.Rd =================================================================== --- trunk/SASxport/man/read.xport.Rd 2013-10-09 17:19:31 UTC (rev 1717) +++ trunk/SASxport/man/read.xport.Rd 2013-10-09 18:15:08 UTC (rev 1718) @@ -128,77 +128,80 @@ } \examples{ -# ------- -# SAS code to generate test dataset: -# ------- -# libname y SASV5XPT "test2.xpt"; -# -# PROC FORMAT; VALUE race 1=green 2=blue 3=purple; RUN; -# PROC FORMAT CNTLOUT=format;RUN; * Name, e.g. 'format', unimportant; -# data test; -# LENGTH race 3 age 4; -# age=30; label age="Age at Beginning of Study"; -# race=2; -# d1='3mar2002'd ; -# dt1='3mar2002 9:31:02'dt; -# t1='11:13:45't; -# output; -# -# age=31; -# race=4; -# d1='3jun2002'd ; -# dt1='3jun2002 9:42:07'dt; -# t1='11:14:13't; -# output; -# format d1 mmddyy10. dt1 datetime. t1 time. race race.; -# run; -# data z; LENGTH x3 3 x4 4 x5 5 x6 6 x7 7 x8 8; -# DO i=1 TO 100; -# x3=ranuni(3); -# x4=ranuni(5); -# x5=ranuni(7); -# x6=ranuni(9); -# x7=ranuni(11); -# x8=ranuni(13); -# output; -# END; -# DROP i; -# RUN; -# PROC MEANS; RUN; -# PROC COPY IN=work OUT=y;SELECT test format z;RUN; *Creates test2.xpt; -# ------ +## ------- +## SAS code to generate test dataset: +## ------- +## libname y SASV5XPT "test2.xpt"; +## +## PROC FORMAT; VALUE race 1=green 2=blue 3=purple; RUN; +## PROC FORMAT CNTLOUT=format;RUN; * Name, e.g. 'format', unimportant; +## data test; +## LENGTH race 3 age 4; +## age=30; label age="Age at Beginning of Study"; +## race=2; +## d1='3mar2002'd ; +## dt1='3mar2002 9:31:02'dt; +## t1='11:13:45't; +## output; +## +## age=31; +## race=4; +## d1='3jun2002'd ; +## dt1='3jun2002 9:42:07'dt; +## t1='11:14:13't; +## output; +## format d1 mmddyy10. dt1 datetime. t1 time. race race.; +## run; +## data z; LENGTH x3 3 x4 4 x5 5 x6 6 x7 7 x8 8; +## DO i=1 TO 100; +## x3=ranuni(3); +## x4=ranuni(5); +## x5=ranuni(7); +## x6=ranuni(9); +## x7=ranuni(11); +## x8=ranuni(13); +## output; +## END; +## DROP i; +## RUN; +## PROC MEANS; RUN; +## PROC COPY IN=work OUT=y;SELECT test format z;RUN; *Creates test2.xpt; +## ------ -# Read this dataset from a local file: +## Read this dataset from a local file: +testFile <- system.file('extdata', 'test2.xpt', package="SASxport") +w <- read.xport(testFile) +class(w) +sapply(w, head) + \dontrun{ -w <- read.xport('test2.xpt') +## Or read a copy of test2.xpt available on the web: +url <- 'http://biostat.mc.vanderbilt.edu/wiki/pub/Main/Hmisc/test2.xpt' +w <- read.xport(url) } -# 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="") +## We can also get the dataset wrapped in a list +w <- read.xport(testfile, as.list=TRUE) +class(w) +sapply(w, head) -w <- read.xport(url) +## And we can ask for the format information to be included as well. +w <- read.xport(testfile, as.list=TRUE, include.formats=TRUE) +class(w) +sapply(w, head) - -# We can also get the dataset wrapped in a list -w <- read.xport(url, as.list=TRUE) - -# And we can ask for the format information to be included as well. -w <- read.xport(url, as.list=TRUE, include.formats=TRUE) - \dontshow{ -SASxport:::assert( is.data.frame(w)==FALSE && is.list(w)==TRUE ) +stopifnot( is.data.frame(w)==FALSE && is.list(w)==TRUE ) } \dontrun{ -## The Hmisc library provides many useful functions for interacting with -## data imported from SAS via read.xport() +#### The Hmisc library provides many useful functions for interacting with +#### data imported from SAS via read.xport() library(Hmisc) describe(w$test) # see labels, format names for dataset test -lapply(w, describe)# see descriptive stats in more detaiil for each variable +lapply(w, describe)# see descriptive stats in more detail for each variable contents(w$test) # another way to see variable attributes lapply(w, contents)# show contents of individual items in more detail This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |