[R-gregmisc-users] SF.net SVN: r-gregmisc: [1164] trunk/SASxport
Brought to you by:
warnes
From: <wa...@us...> - 2007-09-07 16:23:10
|
Revision: 1164 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1164&view=rev Author: warnes Date: 2007-09-07 09:23:10 -0700 (Fri, 07 Sep 2007) Log Message: ----------- Change argument name in write.xport from 'filename' to 'file' to match read.xport Modified Paths: -------------- trunk/SASxport/R/write.xport.R trunk/SASxport/man/read.xport.Rd trunk/SASxport/man/write.xport.Rd trunk/SASxport/tests/Alfalfa_Test.R trunk/SASxport/tests/cars.R trunk/SASxport/tests/testDates.R trunk/SASxport/tests/xxx.R Modified: trunk/SASxport/R/write.xport.R =================================================================== --- trunk/SASxport/R/write.xport.R 2007-09-07 16:21:08 UTC (rev 1163) +++ trunk/SASxport/R/write.xport.R 2007-09-07 16:23:10 UTC (rev 1164) @@ -1,5 +1,5 @@ write.xport <- function( ... , - filename="", + file="", verbose=FALSE, sasVer="7.00", osType, @@ -26,7 +26,7 @@ ## capture names of data frame, but don't clobber explicitly provided names mc <- match.call() - mc$filename <- NULL + mc$file <- NULL mc$verbose <- NULL mc$sasVer <- NULL mc$osType <- NULL @@ -41,11 +41,11 @@ names(dfList) <- dfNames scat("opening file ...") - if (is.character(filename)) - if (filename == "") + if (is.character(file)) + if (file == "") file <- stdout() else { - file <- file(description=filename, open="wb") + file <- file(description=file, open="wb") on.exit(close(file)) } scat("Done") @@ -175,8 +175,8 @@ } scat("Closing file ...") - if (is.character(filename)) - if (filename != "") + if (is.character(file)) + if (file != "") { close(file) on.exit() Modified: trunk/SASxport/man/read.xport.Rd =================================================================== --- trunk/SASxport/man/read.xport.Rd 2007-09-07 16:21:08 UTC (rev 1163) +++ trunk/SASxport/man/read.xport.Rd 2007-09-07 16:23:10 UTC (rev 1164) @@ -71,8 +71,6 @@ \details{ \itemize{ - \item variable names are converted to lower case - \item SAS date, time, and date/time variables are converted respectively to \code{Date}, POSIX, or \code{chron} objects Modified: trunk/SASxport/man/write.xport.Rd =================================================================== --- trunk/SASxport/man/write.xport.Rd 2007-09-07 16:21:08 UTC (rev 1163) +++ trunk/SASxport/man/write.xport.Rd 2007-09-07 16:23:10 UTC (rev 1164) @@ -6,12 +6,12 @@ library file. } \usage{ -write.xport(..., filename = "", verbose = FALSE, sasVer = "7.00", +write.xport(..., file = "", verbose = FALSE, sasVer = "7.00", osType, cDate = Sys.time()) } \arguments{ \item{\dots}{One or more data frames to be stored} - \item{filename}{Filename or connection object. Use "" to view the raw data} + \item{file}{File name or connection object. Use "" to view the raw data} \item{verbose}{Logical flag controlling whether status is reported during processing} \item{sasVer}{SAS version string} Modified: trunk/SASxport/tests/Alfalfa_Test.R =================================================================== --- trunk/SASxport/tests/Alfalfa_Test.R 2007-09-07 16:21:08 UTC (rev 1163) +++ trunk/SASxport/tests/Alfalfa_Test.R 2007-09-07 16:23:10 UTC (rev 1164) @@ -8,7 +8,7 @@ ## Write it out again, pretending to be the same OS, SAS version, and creation date write.xport(SPEC, - filename="Alfalfa2.xpt", + file="Alfalfa2.xpt", cDate=strptime("10DEC99:15:56:30", format="%d%b%y:%H:%M:%S"), osType="OSF1", sasVer="7.00" Modified: trunk/SASxport/tests/cars.R =================================================================== --- trunk/SASxport/tests/cars.R 2007-09-07 16:21:08 UTC (rev 1163) +++ trunk/SASxport/tests/cars.R 2007-09-07 16:23:10 UTC (rev 1164) @@ -10,7 +10,7 @@ summary(cars) write.xport(cars, - filename="cars2.xpt", + file="cars2.xpt", cDate=strptime("28JUL07: 20:59:49", format="%d%b%y:%H:%M:%S"), osType="SunOS", sasVer="9.1" Modified: trunk/SASxport/tests/testDates.R =================================================================== --- trunk/SASxport/tests/testDates.R 2007-09-07 16:21:08 UTC (rev 1163) +++ trunk/SASxport/tests/testDates.R 2007-09-07 16:23:10 UTC (rev 1164) @@ -14,7 +14,7 @@ print(temp) -write.xport( DATETIME=temp, filename="datetime.xpt") +write.xport( DATETIME=temp, file="datetime.xpt") temp2 <- read.xport(file="datetime.xpt", names.tolower=FALSE) print(temp2) Modified: trunk/SASxport/tests/xxx.R =================================================================== --- trunk/SASxport/tests/xxx.R 2007-09-07 16:21:08 UTC (rev 1163) +++ trunk/SASxport/tests/xxx.R 2007-09-07 16:23:10 UTC (rev 1164) @@ -11,7 +11,7 @@ # create a SAS XPORT file from our local data fram write.xport(abc, - filename="xxx2.xpt", + file="xxx2.xpt", cDate=strptime("28JUL07:21:08:06 ", format="%d%b%y:%H:%M:%S"), osType="SunOS", sasVer="9.1" @@ -25,7 +25,7 @@ # create a SAS XPORT file from the SAS data write.xport(abc=abc.SAS, - filename="xxx3.xpt", + file="xxx3.xpt", cDate=strptime("28JUL07:21:08:06 ", format="%d%b%y:%H:%M:%S"), osType="SunOS", sasVer="9.1" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |