r-gregmisc-users Mailing List for R gregmisc package (Page 18)
Brought to you by:
warnes
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
(12) |
Apr
(5) |
May
(3) |
Jun
(5) |
Jul
(2) |
Aug
(5) |
Sep
(7) |
Oct
(15) |
Nov
(34) |
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(3) |
Feb
(16) |
Mar
(28) |
Apr
(5) |
May
|
Jun
(5) |
Jul
(9) |
Aug
(50) |
Sep
(29) |
Oct
(9) |
Nov
(25) |
Dec
(7) |
2008 |
Jan
(6) |
Feb
(4) |
Mar
(5) |
Apr
(8) |
May
(26) |
Jun
(11) |
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(9) |
2009 |
Jan
|
Feb
(1) |
Mar
|
Apr
(2) |
May
(26) |
Jun
|
Jul
(10) |
Aug
(6) |
Sep
|
Oct
(7) |
Nov
(3) |
Dec
(2) |
2010 |
Jan
(45) |
Feb
(11) |
Mar
|
Apr
(1) |
May
(8) |
Jun
(7) |
Jul
(3) |
Aug
(1) |
Sep
|
Oct
(1) |
Nov
(9) |
Dec
(1) |
2011 |
Jan
(2) |
Feb
|
Mar
|
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
(14) |
Sep
(29) |
Oct
(3) |
Nov
|
Dec
(3) |
2012 |
Jan
|
Feb
|
Mar
|
Apr
(7) |
May
(6) |
Jun
(59) |
Jul
|
Aug
(8) |
Sep
(21) |
Oct
|
Nov
|
Dec
|
2013 |
Jan
(1) |
Feb
|
Mar
(10) |
Apr
|
May
(18) |
Jun
(25) |
Jul
(18) |
Aug
(1) |
Sep
(6) |
Oct
(28) |
Nov
(4) |
Dec
(13) |
2014 |
Jan
(7) |
Feb
(5) |
Mar
(4) |
Apr
(36) |
May
(3) |
Jun
(7) |
Jul
(46) |
Aug
(14) |
Sep
(12) |
Oct
(2) |
Nov
|
Dec
(12) |
2015 |
Jan
(4) |
Feb
|
Mar
|
Apr
(80) |
May
(36) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <wa...@us...> - 2012-06-29 18:08:02
|
Revision: 1586 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1586&view=rev Author: warnes Date: 2012-06-29 18:07:56 +0000 (Fri, 29 Jun 2012) Log Message: ----------- Add documentation for the 'quiet' argument of makeSASNames(). Modified Paths: -------------- trunk/SASxport/man/makeSASNames.Rd Modified: trunk/SASxport/man/makeSASNames.Rd =================================================================== --- trunk/SASxport/man/makeSASNames.Rd 2012-06-28 02:27:02 UTC (rev 1585) +++ trunk/SASxport/man/makeSASNames.Rd 2012-06-29 18:07:56 UTC (rev 1586) @@ -7,13 +7,15 @@ Create valid and unique SAS names from a character vector. } \usage{ -makeSASNames(names, nchar = 8, maxPasses = 10) +makeSASNames(names, nchar = 8, maxPasses = 10, quiet=FALSE) } \arguments{ \item{names}{character vector of candidate names} \item{nchar}{maximum number of characters} - \item{maxPasses}{maximum number of attempt to resolve - truncation-related conflicts.} + \item{maxPasses}{maximum number of interations to resolve + truncation-related name duplication.} + \item{quiet}{Logical indicating whether to generate warning messages + when names are truncated or made unique.} } \details{ This function creates valid SAS names from a list of R object or 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:27:09
|
Revision: 1585 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1585&view=rev Author: warnes Date: 2012-06-28 02:27:02 +0000 (Thu, 28 Jun 2012) Log Message: ----------- Changelong shouldn't be stored in svn Removed Paths: ------------- trunk/SASxport/inst/ChangeLog Deleted: trunk/SASxport/inst/ChangeLog =================================================================== --- trunk/SASxport/inst/ChangeLog 2012-06-28 02:25:59 UTC (rev 1584) +++ trunk/SASxport/inst/ChangeLog 2012-06-28 02:27:02 UTC (rev 1585) @@ -1,586 +0,0 @@ -2010-11-12 02:41 warnes - - * [r1455] R/read.xport.R, R/xport.R: Fix bug: 'as.is=TRUE' argument - to read.xport was being ignored. - -2010-11-12 02:36 warnes - - * [r1454] tests/Alfalfa_Test.Rout.save, - tests/TestUnnamedComponents.Rout.save, tests/Theoph.Rout.save, - tests/cars.Rout.save, tests/datetime.xpt, tests/puromycin.xpt, - tests/testDates.Rout.save, tests/testNegative.Rout.save, - tests/testNumeric.Rout.save, tests/test_as_is.R, - tests/test_as_is.Rout.save, tests/test_fields.Rout.save, - tests/xport.Rout.save, tests/xxx.Rout.save: Add test for proper - function of as.is flag to read.xport - -2008-02-29 15:40 warnes - - * [r1245] DESCRIPTION, inst/ChangeLog, inst/NEWS: Update for - release 1.2.3 - -2008-02-29 15:37 warnes - - * [r1244] man/write.xport.Rd: Correct typo in write.xport man page - -2007-11-09 22:45 warnes - - * [r1227] inst/ChangeLog, inst/NEWS: Update NEWS and ChangeLog for - 1.2.2 - -2007-11-09 19:59 warnes - - * [r1226] src/ibm2ieee.c, src/ieee2ibm.c: Apply patches to fix - problems on 64 bit platforms, as sumitted by Brian Ripley. - -2007-11-07 19:01 warnes - - * [r1225] tests/Alfalfa_Test.Rout.save, - tests/TestUnnamedComponents.Rout.save, tests/Theoph.Rout.save, - tests/cars.Rout.save, tests/testDates.Rout.save, - tests/testNegative.Rout.save, tests/testNumeric.Rout.save, - tests/test_fields.Rout.save, tests/xport.Rout.save, - tests/xxx.Rout.save: Update version number - -2007-11-07 18:59 warnes - - * [r1224] DESCRIPTION: Bump version number - -2007-11-07 18:14 warnes - - * [r1223] src/ibm2ieee.c, src/reverse.c, src/writeSAS.c, - src/writeSAS.h: Apply patches to fix problems on 64 bit - platforms, as sumitted by Brian Ripley, and to replace assert() - calls with calls a macro that maps to error() unless standalone - testing is being done, in which case assert() is used. - -2007-11-05 15:25 warnes - - * [r1220] DESCRIPTION, inst/NEWS, src/writeSAS.c: Remove extraneous - ';' characters after function closing brace - -2007-11-01 16:42 warnes - - * [r1211] DESCRIPTION: Remove dependency on foreign, since the - necessary functionality is now provided internally. - -2007-11-01 06:44 warnes - - * [r1210] TODO, inst/ChangeLog: Update TODO file - -2007-11-01 06:43 warnes - - * [r1209] man/SASxport-package.Rd, man/label.Rd, man/read.xport.Rd, - man/toSAS.Rd, man/write.xport.Rd: Update to match changes to - functions - -2007-11-01 06:42 warnes - - * [r1208] DESCRIPTION: Update to match package changes - -2007-11-01 06:42 warnes - - * [r1207] tests/Alfalfa_Test.Rout.save, - tests/TestUnnamedComponents.R, - tests/TestUnnamedComponents.Rout.save, tests/Theoph.Rout.save, - tests/cars.Rout.save, tests/testDates.Rout.save, - tests/testNegative.Rout.save, tests/testNumeric.R, - tests/testNumeric.Rout.save, tests/test_fields.Rout.save, - tests/xport.Rout.save, tests/xxx.R, tests/xxx.Rout.save: Update - stored test output to match package changes - -2007-11-01 06:41 warnes - - * [r1206] inst/NEWS: Update for new release - -2007-11-01 06:16 warnes - - * [r1205] NAMESPACE: Remove dependency on foreign - -2007-11-01 06:15 warnes - - * [r1204] src/ieee2ibm.c, src/init.c, src/swap_bytes.h: Copy code - from foreign for lookup.xport() and read.xport(), extend - lookup.xport() to show information about SAS format and iformat - -2007-11-01 06:14 warnes - - * [r1203] R/SASformat.R, R/SASiformat.R, R/formats.R, R/fstr.R, - R/iformat.R, R/lookup.xport.R, R/make.formats.R, R/read.xport.R, - R/toSAS.R, R/write.xport.R: - Use of the attribute named 'format' - caused problems with chron - objects. Consequently, the format information is now stored in - the - 'SASformat' attribute. For consistency, the input format - information - is now stored in the 'SASiformat' attribute. - - - The functions for extracting and setting the format and iformat - information have been renamed to 'SASformat' and 'SASiformat', - etc. - - - In order to properly handle SAS format information, we now use - a - locally modified version of foreign::lookup.xport and - foreign::read.xport. - - - Various typo corrections - - - Creation of a new function fstr() to generate sas format name - strings - using name, length, and digits information. - - - Addion of a toSAS method for chron() objects - -2007-11-01 06:01 warnes - - * [r1202] R/xport.R, src/SASxport.c, src/SASxport.h: Copy code from - foreign for lookup.xport() and read.xport(), extend - lookup.xport() to show information about SAS format and iformat - -2007-11-01 05:59 warnes - - * [r1201] R/importConvertDateTime.R: Improve handling of SAS data - and time formats, simplify code - -2007-10-29 15:37 warnes - - * [r1200] DESCRIPTION, R/xport.numeric.R, inst/ChangeLog, - src/ibm2ieee.c, src/ieee2ibm.c, tests/testNegative.R: Fixes to - correct handling storage of negative numbers - -2007-10-29 15:35 warnes - - * [r1199] R/zzz.R: Belatedly commit change to startup message to - give path to SASxport product page rather than contact page - -2007-10-29 15:34 warnes - - * [r1198] src/reverse.c: Comment out debugging message in reverse() - -2007-10-29 15:32 warnes - - * [r1197] tests/Alfalfa_Test.Rout.save, - tests/TestUnnamedComponents.Rout.save, tests/Theoph.Rout.save, - tests/cars.Rout.save, tests/testDates.Rout.save, - tests/test_fields.Rout.save, tests/xport.Rout.save, - tests/xxx.Rout.save: Commit changes to stored output to match - changed package load message - -2007-10-22 02:24 warnes - - * [r1196] - branches/GenerateFORMATSfromFactorObjects/SASxport/DESCRIPTION, - trunk/MSOfficeUtil/DESCRIPTION, trunk/RMCMC/DESCRIPTION, - trunk/Rlsf/DESCRIPTION, DESCRIPTION, trunk/bwRF/DESCRIPTION, - trunk/exp.ssize/DESCRIPTION, trunk/fork/DESCRIPTION, - trunk/gdata/DESCRIPTION, trunk/gmodels/DESCRIPTION, - trunk/gplots/DESCRIPTION, trunk/gregmisc/DESCRIPTION, - trunk/ssize/DESCRIPTION: Clarify GPL version - -2007-10-02 22:34 warnes - - * [r1195] inst/ChangeLog, tests/Alfalfa_Test.Rout.save, - tests/TestUnnamedComponents.Rout.save, tests/Theoph.Rout.save, - tests/cars.Rout.save, tests/testDates.Rout.save, - tests/test_fields.Rout.save, tests/xport.Rout.save, - tests/xxx.Rout.save: Add information on how to get help to the - startup message - -2007-10-02 22:30 warnes - - * [r1194] R/zzz.R: Add information on how to get help to the - startup message - -2007-10-02 21:21 warnes - - * [r1193] NAMESPACE: Add dependenct on utils::packageDescription - -2007-10-01 20:09 warnes - - * [r1192] tests/Alfalfa_Test.Rout.save, - tests/TestUnnamedComponents.Rout.save, tests/Theoph.Rout.save, - tests/cars.Rout.save, tests/testDates.Rout.save, - tests/test_fields.Rout.save, tests/xport.Rout.save, - tests/xxx.Rout.save: Update saved R output to include startup - message - -2007-09-25 19:58 warnes - - * [r1191] DESCRIPTION, inst/ChangeLog: Update version number and - date - -2007-09-25 19:54 warnes - - * [r1190] man/SASxport-package.Rd, man/write.xport.Rd: Indicate - that Metrum partially funded development - -2007-09-25 19:53 warnes - - * [r1189] R/zzz.R: Display version and support information on - package load - -2007-09-18 17:42 warnes - - * [r1188] DESCRIPTION: Spent more time than Metrum paid for - -2007-09-15 06:17 warnes - - * [r1187] man/SASxport-package.Rd, man/lookup.xport.Rd, - man/read.xport.Rd, man/toSAS.Rd, - tests/TestUnnamedComponents.Rout.save: Improve formatting for pdf - output - -2007-09-15 05:06 warnes - - * [r1186] inst/ChangeLog: Update changelog - -2007-09-15 04:55 warnes - - * [r1185] tests/TestUnnamedComponents.R: Changes so test - TestUnnamedCompontents.R runs under R 2.4.1 on Win32 - -2007-09-15 04:01 warnes - - * [r1184] DESCRIPTION, R/make.formats.R, R/toSAS.R, - R/write.xport.R, R/xport.character.R, man/Alfalfa.Rd, - man/lookup.xport.Rd, man/toSAS.Rd, man/write.xport.Rd, - tests/Alfalfa_Test.R, tests/Alfalfa_Test.Rout.save, - tests/TestUnnamedComponents.Rout.save, tests/Theoph.Rout.save, - tests/cars.R, tests/cars.Rout.save, tests/test.xpt, - tests/testDates.Rout.save, tests/test_fields.Rout.save, - tests/xport.Rout.save, tests/xxx.R, tests/xxx.Rout.save: Add - support for auto-generating SAS formats for factor objects. - Refactor argument name handling to improve code clarity. - -2007-09-14 15:35 warnes - - * [r1183] R/process.formats.R, R/read.xport.R, data, - data/Alfalfa.R, data/Alfalfa.xpt, inst/ChangeLog, man/Alfalfa.Rd, - man/lookup.xport.Rd, man/read.xport.Rd, - tests/TestUnnamedComponents.Rout.save: Add option to read.xport() - that permits inclusion of PROC CONTENTS format information in the - returned list - -2007-09-13 17:36 warnes - - * [r1180] R/read.xport.R: Ensure 'names.tolower' applies to dataset - names - -2007-09-13 01:55 warnes - - * [r1179] tests/TestUnnamedComponents.Rout.save: Update test output - to match recent changes. - -2007-09-13 01:19 warnes - - * [r1178] R/write.xport.R: Add checking and handling for unnamed - data frames or variables - -2007-09-13 01:14 warnes - - * [r1177] tests/Alfalfa_Test.Rout.save, - tests/TestUnnamedComponents.R, - tests/TestUnnamedComponents.Rout.save, tests/Theoph.Rout.save, - tests/cars.Rout.save, tests/testDates.Rout.save, - tests/test_fields.Rout.save, tests/xport.Rout.save, - tests/xxx.Rout.save: Update tests now that 'units' and 'units<-' - functions no longer are included - -2007-09-12 22:27 warnes - - * [r1176] NAMESPACE: Remove units() and units<-() functions since - they arene't ever used. - -2007-09-12 22:25 warnes - - * [r1175] R/units.R, man/label.Rd, man/units.Rd: Remove units() and - units<-() functions since they arene't ever used. - -2007-09-12 22:24 warnes - - * [r1174] man/units.Rd: Remove units from manual page - -2007-09-11 23:08 warnes - - * [r1173] man/read.xport.Rd: Add assertion to test that - read.xport(.., as.list=TRUE) works properly - -2007-09-11 23:05 warnes - - * [r1172] R/write.xport.R: Forgot to save buffer before svn commit. - -2007-09-11 21:22 warnes - - * [r1171] R/read.xport.R, man/read.xport.Rd: Correct error in - handling 'verbose' argument, error when more than one dataset has - the same name, and add 'as.list' argument to ensure return value - is a list, even if there is only one dataset in the file - -2007-09-11 21:21 warnes - - * [r1170] R/write.xport.R, man/write.xport.Rd: Improve handling of - list argument. Also check that names are proper and unique. - -2007-09-07 16:47 warnes - - * [r1167] tests/Theoph.R, tests/Theoph.Rout.save: Add round-trip - test for Theoph data set - -2007-09-07 16:32 warnes - - * [r1166] tests/Alfalfa_Test.Rout.save, tests/cars.Rout.save, - tests/testDates.Rout.save, tests/xxx.Rout.save: Change argument - name in write.xport from 'filename' to 'file' to match read.xport - -2007-09-07 16:25 warnes - - * [r1165] man/write.xport.Rd: Change argument name in write.xport - from 'filename' to 'file' to match read.xport - -2007-09-07 16:23 warnes - - * [r1164] R/write.xport.R, man/read.xport.Rd, man/write.xport.Rd, - tests/Alfalfa_Test.R, tests/cars.R, tests/testDates.R, - tests/xxx.R: Change argument name in write.xport from 'filename' - to 'file' to match read.xport - -2007-09-07 16:21 warnes - - * [r1163] DESCRIPTION: Fix typo - -2007-08-29 02:24 warnes - - * [r1161] DESCRIPTION: Update Version to 1.0, depend on current - version of foreign - -2007-08-22 19:21 warnes - - * [r1160] ChangeLog, NEWS, inst/ChangeLog, inst/NEWS: Update - ChangeLog and NEWS files - -2007-08-22 18:11 warnes - - * [r1159] R/read.xport.R, man/read.xport.Rd, tests/xport.Rout.save: - Modify read.xport to preserve case of SAS names by default, as - well as updating the example code. - -2007-08-22 01:19 warnes - - * [r1158] src/reverse.c: sprintf() was being used where printf() - was intended. - -2007-08-21 18:16 warnes - - * [r1157] DESCRIPTION: Slight improvement to credits for BRL-CAD - -2007-08-21 18:13 warnes - - * [r1156] TODO, man/lookup.xport.Rd, man/read.xport.Rd: Commit - previous updates - -2007-08-21 18:12 warnes - - * [r1155] src/htond.c, src/ibm2ieee.c, src/ieee2ibm.c, src/init.c, - src/reverse.c, src/test_fields.c: Commit previous updates - -2007-08-15 07:02 warnes - - * [r1146] DESCRIPTION, man/SASxport-package.Rd, src/cnxptiee.c, - src/cnxptiee.h, src/htond.c, src/init.c, src/reverse.c, - src/test_fields.c, src/writeSAS.c, src/writeSAS.h: Remove - dependency on SAS code - -2007-08-15 06:06 warnes - - * [r1145] src/reverse.c: Fix reverse.c because we need to swap - everything to match Big-Endian, rather than Little-Endian. Also, - dont' call the macro. - -2007-08-15 06:04 warnes - - * [r1144] src/reverse.c: Restore reverse.c - -2007-08-15 03:17 warnes - - * [r1143] DESCRIPTION: Minor reformatting - -2007-08-15 03:14 warnes - - * [r1142] DESCRIPTION, inst/doc/SAS_TS140.txt, inst/doc/index.html, - inst/doc/r2xpt.doc, man/SASxport-package.Rd, man/lookup.xport.Rd, - man/read.xport.Rd, man/toSAS.Rd, man/units.Rd, - man/write.xport.Rd: Make corrections for typos noted by Metrum - folks - -2007-08-12 03:22 warnes - - * [r1138] DESCRIPTION, man/lookup.xport.Rd, src/cnxptiee.h, - src/test_fields.c, src/writeSAS.h: More updates - -2007-08-12 03:13 warnes - - * [r1137] src/B8.h, src/IEEEtoIBM.c, src/MASKS.h, src/main.c, - src/reverse.c: Remove new stuff... use SAS's code instead - -2007-08-12 03:12 warnes - - * [r1136] src/B8.h, src/IEEEtoIBM.c, src/MASKS.h, src/cnxptiee.h, - src/main.c, src/reverse.c, src/test_fields.c, src/writeSAS.h: 1st - attempt at rewriting cnxptiee.[ch] - -2007-08-11 23:48 warnes - - * [r1135] R/read.xport.R: Explicitly check file header - -2007-08-11 00:03 warnes - - * [r1134] DESCRIPTION, man/SASxport-package.Rd: Improve package - description - -2007-08-09 23:29 warnes - - * [r1133] DESCRIPTION, NAMESPACE, TODO, man/lookup.xport.Rd, - man/read.xport.Rd, man/units.Rd: More changes, esp to - lookup.xport() and friends - -2007-08-09 23:28 warnes - - * [r1132] tests/Alfalfa_Test.Rout.save, tests/cars.Rout.save, - tests/xport.Rout.save: More changes, esp to lookup.xport() and - friends - -2007-08-09 23:28 warnes - - * [r1131] R/AFirst.lib.s, R/all.is.numeric.R, R/in.opererator.R, - R/lookup.xport.R, R/read.xport.R, R/write.xport.R: More changes, - esp to lookup.xport() and friends - -2007-08-09 19:02 warnes - - * [r1130] src/swap_bytes.h: Remove unused swap_bytes.h - -2007-08-09 19:02 warnes - - * [r1129] man/SASxport-package.Rd: Add package description page - -2007-08-09 16:54 warnes - - * [r1128] R/importConvertDateTime.R, R/makeNames.R, R/read.xport.R, - R/testDateTime.R: Add comment header indicating the source of - code from Hmisc - -2007-08-09 16:53 warnes - - * [r1127] tests/testDates.Rout.save, tests/test_fields.Rout.save, - tests/xport.Rout.save, tests/xxx.Rout.save: Update saved output - of test scripts - -2007-08-08 18:54 warnes - - * [r1126] DESCRIPTION, NAMESPACE: Updates - -2007-08-08 18:54 warnes - - * [r1125] tests/Alfalfa_Test.R, tests/Alfalfa_Test.Rout.save, - tests/cars.R, tests/cars.Rout.save, tests/datetime.xpt, - tests/testDates.R, tests/test_fields.R, - tests/test_fields.Rout.save, tests/xport.R, tests/xxx.R, - tests/xxx.Rout.save: Updates - -2007-08-08 18:54 warnes - - * [r1124] src/SASxport.c, src/SASxport.h, src/foreign.h, - src/init.c: Updates - -2007-08-08 18:53 warnes - - * [r1123] R/AFirst.lib.s, R/formats.R, R/iformat.R, - R/importConvertDateTime.R, R/label.R, R/lookup.xport.R, - R/makeNames.R, R/read.xport.R, R/testDateTime.R, R/units.R, - R/xport.R: Updates - -2007-08-08 18:53 warnes - - * [r1122] man/assert.Rd, man/read.xport.Rd, man/units.Rd: Updates. - -2007-08-03 04:44 warnes - - * [r1119] DESCRIPTION, NAMESPACE, R/scat.R, R/xport.R, R/zzz.R, - man/lookup.xport.Rd, man/read.xport.Rd, src/SASxport.c, - src/SASxport.h, src/cnxptiee.c, src/cnxptiee.h, src/foreign.h, - src/init.c, src/swap_bytes.h, src/test_fields.c, src/writeSAS.c, - src/writeSAS.h, tests/Alfalfa_Test.Rout.save, - tests/cars.Rout.save, tests/datetime.xpt, tests/test.xpt, - tests/testDates.Rout.save, tests/test_fields.Rout.save, - tests/xport.R, tests/xport.Rout.save, tests/xxx.Rout.save: Add - code from package foreign and gtools to make SASxport stand alone - -2007-08-03 01:46 warnes - - * [r1118] R/.Rhistory: Remove stray .Rhistory file - -2007-08-03 01:45 warnes - - * [r1117] DESCRIPTION: Acknowledge MetrumI support - -2007-08-03 01:45 warnes - - * [r1116] NAMESPACE: Add "assert" function - -2007-08-03 01:44 warnes - - * [r1115] R/assert.R, man/assert.Rd: Add "assert" function to avoid - dependenct on gtools. - -2007-08-03 01:29 warnes - - * [r1114] man/toSAS.Rd, src/cnxptiee.c, src/writeSAS.c: Correct - some typos. - -2007-08-03 00:40 warnes - - * [r1113] DESCRIPTION: Drop version number to 0.99 until testing - integration and is complete - -2007-08-03 00:39 warnes - - * [r1112] tests/test_fields.R: Add R test file to run c-level tests - -2007-08-03 00:36 warnes - - * [r1111] src/SASxport.so: Remove .so from svn - -2007-08-03 00:35 warnes - - * [r1110] NAMESPACE, R/fromSASDate.R, R/parseFormat.R, R/toSAS.R, - R/write.xport.R, R/xport.character.R, R/xport.file.header.R, - R/xport.member.header.R, R/xport.namestr.R, man/toSAS.Rd, - src/SASxport.so, src/writeSAS.c: More modifications. Should now - work for most R data types - -2007-08-03 00:35 warnes - - * [r1109] tests/cars.R, tests/datetime.xpt, tests/testDates.R, - tests/xxx.R: Add more tests - -2007-07-29 01:15 warnes - - * [r1107] tests/Alfalfa2.xpt, tests/cars.sas, tests/cars.xpt, - tests/xxx.sas, tests/xxx.xpt: Add SAS code to create xport data - files for testing - -2007-07-28 08:47 warnes - - * [r1106] ., DESCRIPTION, NAMESPACE, R, R/.Rhistory, R/blanks.R, - R/rawToDisplay.R, R/write.xport.R, R/xport.NA.R, - R/xport.character.R, R/xport.dateFMT.R, R/xport.file.header.R, - R/xport.fill.R, R/xport.member.header.R, R/xport.namestr.R, - R/xport.namestr.header.R, R/xport.numeric.R, - R/xport.obs.header.R, R/zzz.R, inst, inst/doc, - inst/doc/SAS_TS140.txt, inst/doc/index.html, inst/doc/r2xpt.doc, - man, man/write.xport.Rd, src, src/SASxport.so, src/cnxptiee.c, - src/cnxptiee.h, src/test_fields.c, src/writeSAS.c, - src/writeSAS.h, tests, tests/Alfalfa.xpt, tests/Alfalfa2.xpt, - tests/Alfalfa_Test.R: Add SVNxport package - 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:26:05
|
Revision: 1584 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1584&view=rev Author: warnes Date: 2012-06-28 02:25:59 +0000 (Thu, 28 Jun 2012) Log Message: ----------- Fix see also reference for make.names(). Modified Paths: -------------- trunk/SASxport/man/makeSASNames.Rd Modified: trunk/SASxport/man/makeSASNames.Rd =================================================================== --- trunk/SASxport/man/makeSASNames.Rd 2012-06-28 02:24:49 UTC (rev 1583) +++ trunk/SASxport/man/makeSASNames.Rd 2012-06-28 02:25:59 UTC (rev 1584) @@ -31,7 +31,7 @@ Gregory R. Warnes \email{gr...@wa...} } \seealso{ - make.names + \code{\link[base]{make.names}} } \examples{ ## Simple example: no duplicates or more than 8 characters 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...> - 2012-06-28 02:13:06
|
Revision: 1582 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1582&view=rev Author: warnes Date: 2012-06-28 02:13:00 +0000 (Thu, 28 Jun 2012) Log Message: ----------- Add man page for makeSASNames() function. Added Paths: ----------- trunk/SASxport/man/makeSASNames.Rd Added: trunk/SASxport/man/makeSASNames.Rd =================================================================== --- trunk/SASxport/man/makeSASNames.Rd (rev 0) +++ trunk/SASxport/man/makeSASNames.Rd 2012-06-28 02:13:00 UTC (rev 1582) @@ -0,0 +1,53 @@ +\name{makeSASNames} +\alias{makeSASNames} +\title{ + Create valid and unique SAS names from a character vector. +} +\description{ + Create valid and unique SAS names from a character vector. +} +\usage{ +makeSASNames(names, nchar = 8, maxPasses = 10) +} +\arguments{ + \item{names}{character vector of candidate names} + \item{nchar}{maximum number of characters} + \item{maxPasses}{maximum number of attempt to resolve + truncation-related conflicts.} +} +\details{ + This function creates valid SAS names from a list of R object or + column names, properly handling case conversion (all converted to + upper-case), length restructions (8 characters), and making duplicate + names unique. This is not as obvious as it appears, since the process + of shortening names can cause duplicates, and adding digits to the end + of names to make them unique can make them too long, so a few + iterations may be required to ensure valid and unique names. +} +\value{ + character vector of unique names valid in SAS. +} +\author{ + Gregory R. Warnes \email{gr...@wa...} +} +\seealso{ + make.names +} +\examples{ + ## Simple example: no duplicates or more than 8 characters + makeSASNames( c("height","weight","age","gender")) + + ## Resolve duplicates + makeSASNames( c("a","a","b","b","b","c") ) + + ## Truncate long names + makeSASNames( c("alphabetic", "numeric", "alphanumeric", "whitespace")) + + ## Truncate and make unique + makeSASNames( rep( c("aaaaaaaaaaa","bbbbbbbbbb"), each=3) ) + + ## Now do it quietly! + makeSASNames( rep( c("aaaaaaaaaaa","bbbbbbbbbb"), each=3), quiet=TRUE) +} +\keyword{manip} + 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:12:39
|
Revision: 1581 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1581&view=rev Author: warnes Date: 2012-06-28 02:12:32 +0000 (Thu, 28 Jun 2012) Log Message: ----------- Fixed bug when only some names are duplicated. Modified Paths: -------------- trunk/SASxport/R/makeSASNames.R Modified: trunk/SASxport/R/makeSASNames.R =================================================================== --- trunk/SASxport/R/makeSASNames.R 2012-06-28 01:42:52 UTC (rev 1580) +++ trunk/SASxport/R/makeSASNames.R 2012-06-28 02:12:32 UTC (rev 1581) @@ -1,4 +1,4 @@ -makeSASNames <- function(names, nchar=8, maxPasses=10) +makeSASNames <- function(names, nchar=8, maxPasses=10, quiet=FALSE) { ## This function takes a vector of potential SAS dataset or ## variable names and converts them into *unique* 8-character @@ -12,7 +12,8 @@ if (any(tooLong)) { shortNames <- substr(as.character(names), 1, nchar) - warning("Truncated ", sum(tooLong), " long names to 8 characters.") + if(!quiet) + warning("Truncated ", sum(tooLong), " long names to 8 characters.") } else shortNames <- names @@ -26,7 +27,7 @@ { passes <- passes+1 dups <- duplicated(varNames) - repeatCount <- table(varNames[dups]) + repeatCount <- table(varNames)-1 digitChars <- nchar(as.character(repeatCount))+1 names(digitChars) <- names(repeatCount) newNames <- make.names(substr(varNames, 1, nchar-digitChars[varNames]), unique=TRUE) @@ -39,7 +40,7 @@ if(any(duplicated(varNames))) stop("Unable to make all names unique after ", passes, " passes.") - if(any(dups)) + if(any(dups) && !quiet) warning("Made ",sum(dups)," duplicate names unique.") varNames This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2012-06-28 01:42:59
|
Revision: 1580 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1580&view=rev Author: warnes Date: 2012-06-28 01:42:52 +0000 (Thu, 28 Jun 2012) Log Message: ----------- New makeSASNames() function creates valid SAS names from a list of R object or column names, properly handling case conversion (all converted to upper-case), length restructions (8 characters), and making duplicate names unique. This is not as obvious as it appears, since the process of shortening names can render cause name to become duplicates, and adding digits to the end of names to make them unique can make them too long, so a few iterations may be requireed to ensure valid and unique names. Modified Paths: -------------- trunk/SASxport/R/write.xport.R Added Paths: ----------- trunk/SASxport/R/makeSASNames.R trunk/SASxport/tests/testDuplicateNames.R trunk/SASxport/tests/testDuplicateNames.Rout.save trunk/SASxport/tests/testManyNames.R trunk/SASxport/tests/testManyNames.Rout.save Added: trunk/SASxport/R/makeSASNames.R =================================================================== --- trunk/SASxport/R/makeSASNames.R (rev 0) +++ trunk/SASxport/R/makeSASNames.R 2012-06-28 01:42:52 UTC (rev 1580) @@ -0,0 +1,46 @@ +makeSASNames <- function(names, nchar=8, maxPasses=10) + { + ## This function takes a vector of potential SAS dataset or + ## variable names and converts them into *unique* 8-character + ## names. + + # Step 0: converce to uppercase + names <- toupper(names) + + # Step 1: expand/truncate to 8 characters + tooLong <- nchar(names)>8 + if (any(tooLong)) + { + shortNames <- substr(as.character(names), 1, nchar) + warning("Truncated ", sum(tooLong), " long names to 8 characters.") + } + else + shortNames <- names + + # concievably, this could take a couple of iterations, because + # shortening the names to add digits may create new duplicates... + varNames <- shortNames + passes <- 0 + dups <- FALSE + while ( any(duplicated(varNames)) && passes<maxPasses ) + { + passes <- passes+1 + dups <- duplicated(varNames) + repeatCount <- table(varNames[dups]) + digitChars <- nchar(as.character(repeatCount))+1 + names(digitChars) <- names(repeatCount) + newNames <- make.names(substr(varNames, 1, nchar-digitChars[varNames]), unique=TRUE) + changed <- newNames != names + + ##newNames[changed] <- gsub("\\.([0-9]+)$","\\1", newNames[changed]) + varNames <- newNames + } + + if(any(duplicated(varNames))) + stop("Unable to make all names unique after ", passes, " passes.") + + if(any(dups)) + warning("Made ",sum(dups)," duplicate names unique.") + + varNames + } Modified: trunk/SASxport/R/write.xport.R =================================================================== --- trunk/SASxport/R/write.xport.R 2012-06-28 01:37:19 UTC (rev 1579) +++ trunk/SASxport/R/write.xport.R 2012-06-28 01:42:52 UTC (rev 1580) @@ -88,33 +88,8 @@ ####### ## - scat("Check length of object names...\n") - long.names <- which(nchar(dfNames)>8) - if(length(long.names)>0) - { - old.names <- dfNames[long.names] - new.names <- substr(old.names, 1, 8 ) - - warning("Truncating object names with more than 8 characters. ", - paste(long.names, - ":'", - old.names, - "' --> '", - new.names, - "'", - sep="", - collapse=", " )) - - dfNames[long.names] <- new.names - } - - ####### - ## scat("Ensure object names are valid and unique...\n") - dfNames <- substr(make.names(dfNames, unique=TRUE),1,8) - if( all(names(dfList)!=dfNames)) - warning("Data frame names modified to obey SAS rules") - names(dfList) <- dfNames + names(dfList) <- dfNames <- makeSASNames(dfNames) ## ####### @@ -174,14 +149,9 @@ dfList[[i]] <- df } - varNames <- substr(make.names(colnames(df), unique=TRUE),1,8) - if( any(colnames(df)!=varNames)) - { - warning("Variable names modified to obey SAS rules") - colnames(df) <- varNames - dfList[[i]] <- df - } - + + colnames(dfList[[i]]) <- colnames(df) <- varNames <- makeSASNames(colnames(df)) + offsetTable <- data.frame("name"=varNames, "len"=NA, "offset"=NA ) rownames(offsetTable) <- offsetTable[,"name"] Added: trunk/SASxport/tests/testDuplicateNames.R =================================================================== --- trunk/SASxport/tests/testDuplicateNames.R (rev 0) +++ trunk/SASxport/tests/testDuplicateNames.R 2012-06-28 01:42:52 UTC (rev 1580) @@ -0,0 +1,16 @@ +library(SASxport) + + +##tests +example(read.xport) + +# Duplicate df names +write.xport("AA"=w$test,"Aa"=w$test,"aA"=w$test,"aa"=w$test, file="dn.a.xpt") #1.a +read.xport("dn.a.xpt") + +# Duplicate column names +a = w$test +b = w$test +colnames(b) <- tolower(colnames(b)) +write.xport("combined"=cbind(a, b), file="dn.b.xpt") +read.xport("dn.b.xpt") Added: trunk/SASxport/tests/testDuplicateNames.Rout.save =================================================================== --- trunk/SASxport/tests/testDuplicateNames.Rout.save (rev 0) +++ trunk/SASxport/tests/testDuplicateNames.Rout.save 2012-06-28 01:42:52 UTC (rev 1580) @@ -0,0 +1,159 @@ + +R version 2.15.0 (2012-03-30) +Copyright (C) 2012 The R Foundation for Statistical Computing +ISBN 3-900051-07-0 +Platform: i386-apple-darwin9.8.0/i386 (32-bit) + +R is free software and comes with ABSOLUTELY NO WARRANTY. +You are welcome to redistribute it under certain conditions. +Type 'license()' or 'licence()' for distribution details. + +R is a collaborative project with many contributors. +Type 'contributors()' for more information and +'citation()' on how to cite R or R packages in publications. + +Type 'demo()' for some demos, 'help()' for on-line help, or +'help.start()' for an HTML browser interface to help. +Type 'q()' to quit R. + +> library(SASxport) + +Loaded SASxport version 1.3.0 (2012-06-21). + + Type `?SASxport' for usage information. + +> +> +> ##tests +> example(read.xport) + +rd.xpr> # ------- +rd.xpr> # SAS code to generate test dataset: +rd.xpr> # ------- +rd.xpr> # libname y SASV5XPT "test2.xpt"; +rd.xpr> # +rd.xpr> # PROC FORMAT; VALUE race 1=green 2=blue 3=purple; RUN; +rd.xpr> # PROC FORMAT CNTLOUT=format;RUN; * Name, e.g. 'format', unimportant; +rd.xpr> # data test; +rd.xpr> # LENGTH race 3 age 4; +rd.xpr> # age=30; label age="Age at Beginning of Study"; +rd.xpr> # race=2; +rd.xpr> # d1='3mar2002'd ; +rd.xpr> # dt1='3mar2002 9:31:02'dt; +rd.xpr> # t1='11:13:45't; +rd.xpr> # output; +rd.xpr> # +rd.xpr> # age=31; +rd.xpr> # race=4; +rd.xpr> # d1='3jun2002'd ; +rd.xpr> # dt1='3jun2002 9:42:07'dt; +rd.xpr> # t1='11:14:13't; +rd.xpr> # output; +rd.xpr> # format d1 mmddyy10. dt1 datetime. t1 time. race race.; +rd.xpr> # run; +rd.xpr> # data z; LENGTH x3 3 x4 4 x5 5 x6 6 x7 7 x8 8; +rd.xpr> # DO i=1 TO 100; +rd.xpr> # x3=ranuni(3); +rd.xpr> # x4=ranuni(5); +rd.xpr> # x5=ranuni(7); +rd.xpr> # x6=ranuni(9); +rd.xpr> # x7=ranuni(11); +rd.xpr> # x8=ranuni(13); +rd.xpr> # output; +rd.xpr> # END; +rd.xpr> # DROP i; +rd.xpr> # RUN; +rd.xpr> # PROC MEANS; RUN; +rd.xpr> # PROC COPY IN=work OUT=y;SELECT test format z;RUN; *Creates test2.xpt; +rd.xpr> # ------ +rd.xpr> +rd.xpr> # Read this dataset from a local file: +rd.xpr> ## Not run: +rd.xpr> ##D w <- read.xport('test2.xpt') +rd.xpr> ## End(Not run) +rd.xpr> +rd.xpr> # Or read a copy of test2.xpt available on the web: +rd.xpr> host <- 'http://biostat.mc.vanderbilt.edu' + +rd.xpr> path <- '/cgi-bin/viewvc.cgi/*checkout*/Hmisc/trunk/tests/test2.xpt' + +rd.xpr> url <- paste(host,path,sep="") + +rd.xpr> w <- read.xport(url) + +rd.xpr> # We can also get the dataset wrapped in a list +rd.xpr> w <- read.xport(url, as.list=TRUE) + +rd.xpr> # And we can ask for the format information to be included as well. +rd.xpr> w <- read.xport(url, as.list=TRUE, include.formats=TRUE) + +rd.xpr> ## Don't show: +rd.xpr> SASxport:::assert( is.data.frame(w)==FALSE && is.list(w)==TRUE ) + +rd.xpr> ## End Don't show +rd.xpr> +rd.xpr> +rd.xpr> ## Not run: +rd.xpr> ##D ## The Hmisc library provides many useful functions for interacting with +rd.xpr> ##D ## data imported from SAS via read.xport() +rd.xpr> ##D library(Hmisc) +rd.xpr> ##D +rd.xpr> ##D describe(w$test) # see labels, format names for dataset test +rd.xpr> ##D lapply(w, describe)# see descriptive stats in more detaiil for each variable +rd.xpr> ##D +rd.xpr> ##D contents(w$test) # another way to see variable attributes +rd.xpr> ##D lapply(w, contents)# show contents of individual items in more detail +rd.xpr> ##D +rd.xpr> ##D options(digits=7) # compare the following matrix with PROC MEANS output +rd.xpr> ##D t(sapply(w$z, function(x) +rd.xpr> ##D c(Mean=mean(x),SD=sqrt(var(x)),Min=min(x),Max=max(x)))) +rd.xpr> ## End(Not run) +rd.xpr> +rd.xpr> +rd.xpr> +rd.xpr> +> +> # Duplicate df names +> write.xport("AA"=w$test,"Aa"=w$test,"aA"=w$test,"aa"=w$test, file="dn.a.xpt") #1.a +Warning message: +In makeSASNames(dfNames) : Made 3 duplicate names unique. +> read.xport("dn.a.xpt") +$aa + RACE AGE D1 DT1 T1 +1 blue 30 2002-03-03 (03 Mar 2002 04:31:02) 11:13:45 +2 31 2002-06-03 (03 Jun 2002 04:42:07) 11:14:13 + +$aa.1 + RACE AGE D1 DT1 T1 +1 blue 30 2002-03-03 (03 Mar 2002 04:31:02) 11:13:45 +2 31 2002-06-03 (03 Jun 2002 04:42:07) 11:14:13 + +$aa.2 + RACE AGE D1 DT1 T1 +1 blue 30 2002-03-03 (03 Mar 2002 04:31:02) 11:13:45 +2 31 2002-06-03 (03 Jun 2002 04:42:07) 11:14:13 + +$aa.3 + RACE AGE D1 DT1 T1 +1 blue 30 2002-03-03 (03 Mar 2002 04:31:02) 11:13:45 +2 31 2002-06-03 (03 Jun 2002 04:42:07) 11:14:13 + +> +> # Duplicate column names +> a = w$test +> b = w$test +> colnames(b) <- tolower(colnames(b)) +> write.xport("combined"=cbind(a, b), file="dn.b.xpt") +Warning message: +In makeSASNames(colnames(df)) : Made 5 duplicate names unique. +> read.xport("dn.b.xpt") + RACE AGE D1 DT1 T1 RACE.1 AGE.1 D1.1 +1 blue 30 2002-03-03 (03 Mar 2002 04:31:02) 11:13:45 blue 30 2002-03-03 +2 31 2002-06-03 (03 Jun 2002 04:42:07) 11:14:13 31 2002-06-03 + DT1.1 T1.1 +1 (03 Mar 2002 04:31:02) 11:13:45 +2 (03 Jun 2002 04:42:07) 11:14:13 +> +> proc.time() + user system elapsed + 0.430 0.031 2.232 Added: trunk/SASxport/tests/testManyNames.R =================================================================== --- trunk/SASxport/tests/testManyNames.R (rev 0) +++ trunk/SASxport/tests/testManyNames.R 2012-06-28 01:42:52 UTC (rev 1580) @@ -0,0 +1,30 @@ +library(SASxport) + +data(iris) + +# to 'stress test' use 200 instead of 20 +ncopies <- 20 + +## create a data file containing ncopies separate copies of the iris *dataframe* +manyDF.out <- rep(list(iris),ncopies) +names(manyDF.out) <- rep("iris", ncopies) +manyDF.out$file <- "manyDF.xport" + +do.call(write.xport, manyDF.out) +manyDF.in <- read.xport(file="manyDF.xport") +names(manyDF.in) +head(manyDF.in[[ncopies]]) +tail(manyDF.in[[ncopies]]) +stopifnot( all( sapply(manyDF.in, dim)==c(150,5) ) ) +stopifnot( all( sapply(manyDF.in, colnames) == colnames(manyDF.in[[ncopies]]) ) ) + +## create a data file containing a single dataframe that holds ncopies copies of +## the *columns* of the iris dataframe +manyCols.out <- do.call(cbind, rep(list(iris),ncopies)) +dim(manyCols.out) +write.xport(manyCols.out, file="manyCols.xport") + +manyCols.in <- read.xport("manyCols.xport") +names(manyCols.in) +stopifnot(dim(manyCols.in)==dim(manyCols.out)) + Added: trunk/SASxport/tests/testManyNames.Rout.save =================================================================== --- trunk/SASxport/tests/testManyNames.Rout.save (rev 0) +++ trunk/SASxport/tests/testManyNames.Rout.save 2012-06-28 01:42:52 UTC (rev 1580) @@ -0,0 +1,98 @@ + +R version 2.15.0 (2012-03-30) +Copyright (C) 2012 The R Foundation for Statistical Computing +ISBN 3-900051-07-0 +Platform: i386-apple-darwin9.8.0/i386 (32-bit) + +R is free software and comes with ABSOLUTELY NO WARRANTY. +You are welcome to redistribute it under certain conditions. +Type 'license()' or 'licence()' for distribution details. + +R is a collaborative project with many contributors. +Type 'contributors()' for more information and +'citation()' on how to cite R or R packages in publications. + +Type 'demo()' for some demos, 'help()' for on-line help, or +'help.start()' for an HTML browser interface to help. +Type 'q()' to quit R. + +> library(SASxport) + +Loaded SASxport version 1.3.0 (2012-06-21). + + Type `?SASxport' for usage information. + +> +> data(iris) +> +> # to 'stress test' use 200 instead of 20 +> ncopies <- 20 +> +> ## create a data file containing ncopies separate copies of the iris *dataframe* +> manyDF.out <- rep(list(iris),ncopies) +> names(manyDF.out) <- rep("iris", ncopies) +> manyDF.out$file <- "manyDF.xport" +> +> do.call(write.xport, manyDF.out) +There were 21 warnings (use warnings() to see them) +> manyDF.in <- read.xport(file="manyDF.xport") +> names(manyDF.in) + [1] "iris" "iris.1" "iris.2" "iris.3" "iris.4" "iris.5" "iris.6" + [8] "iris.7" "iris.8" "iris.9" "iris.10" "iris.11" "iris.12" "iris.13" +[15] "iris.14" "iris.15" "iris.16" "iris.17" "iris.18" "iris.19" +> head(manyDF.in[[ncopies]]) + SEPAL.LE SEPAL.WI PETAL.LE PETAL.WI SPECIES +1 5.1 3.5 1.4 0.2 setosa +2 4.9 3.0 1.4 0.2 setosa +3 4.7 3.2 1.3 0.2 setosa +4 4.6 3.1 1.5 0.2 setosa +5 5.0 3.6 1.4 0.2 setosa +6 5.4 3.9 1.7 0.4 setosa +> tail(manyDF.in[[ncopies]]) + SEPAL.LE SEPAL.WI PETAL.LE PETAL.WI SPECIES +145 6.7 3.3 5.7 2.5 virginica +146 6.7 3.0 5.2 2.3 virginica +147 6.3 2.5 5.0 1.9 virginica +148 6.5 3.0 5.2 2.0 virginica +149 6.2 3.4 5.4 2.3 virginica +150 5.9 3.0 5.1 1.8 virginica +> stopifnot( all( sapply(manyDF.in, dim)==c(150,5) ) ) +> stopifnot( all( sapply(manyDF.in, colnames) == colnames(manyDF.in[[ncopies]]) ) ) +> +> ## create a data file containing a single dataframe that holds ncopies copies of +> ## the *columns* of the iris dataframe +> manyCols.out <- do.call(cbind, rep(list(iris),ncopies)) +> dim(manyCols.out) +[1] 150 100 +> write.xport(manyCols.out, file="manyCols.xport") +Warning messages: +1: In makeSASNames(dfNames) : Truncated 1 long names to 8 characters. +2: In makeSASNames(colnames(df)) : + Truncated 80 long names to 8 characters. +3: In makeSASNames(colnames(df)) : Made 95 duplicate names unique. +> +> manyCols.in <- read.xport("manyCols.xport") +> names(manyCols.in) + [1] "SEPAL" "SEPAL.1" "PETAL" "PETAL.1" "SPECI" "SEPAL.2" + [7] "SEPAL.3" "PETAL.2" "PETAL.3" "SPECI.1" "SEPAL.4" "SEPAL.5" + [13] "PETAL.4" "PETAL.5" "SPECI.2" "SEPAL.6" "SEPAL.7" "PETAL.6" + [19] "PETAL.7" "SPECI.3" "SEPAL.8" "SEPAL.9" "PETAL.8" "PETAL.9" + [25] "SPECI.4" "SEPAL.10" "SEPAL.11" "PETAL.10" "PETAL.11" "SPECI.5" + [31] "SEPAL.12" "SEPAL.13" "PETAL.12" "PETAL.13" "SPECI.6" "SEPAL.14" + [37] "SEPAL.15" "PETAL.14" "PETAL.15" "SPECI.7" "SEPAL.16" "SEPAL.17" + [43] "PETAL.16" "PETAL.17" "SPECI.8" "SEPAL.18" "SEPAL.19" "PETAL.18" + [49] "PETAL.19" "SPECI.9" "SEPAL.20" "SEPAL.21" "PETAL.20" "PETAL.21" + [55] "SPECI.10" "SEPAL.22" "SEPAL.23" "PETAL.22" "PETAL.23" "SPECI.11" + [61] "SEPAL.24" "SEPAL.25" "PETAL.24" "PETAL.25" "SPECI.12" "SEPAL.26" + [67] "SEPAL.27" "PETAL.26" "PETAL.27" "SPECI.13" "SEPAL.28" "SEPAL.29" + [73] "PETAL.28" "PETAL.29" "SPECI.14" "SEPAL.30" "SEPAL.31" "PETAL.30" + [79] "PETAL.31" "SPECI.15" "SEPAL.32" "SEPAL.33" "PETAL.32" "PETAL.33" + [85] "SPECI.16" "SEPAL.34" "SEPAL.35" "PETAL.34" "PETAL.35" "SPECI.17" + [91] "SEPAL.36" "SEPAL.37" "PETAL.36" "PETAL.37" "SPECI.18" "SEPAL.38" + [97] "SEPAL.39" "PETAL.38" "PETAL.39" "SPECI.19" +> stopifnot(dim(manyCols.in)==dim(manyCols.out)) +> +> +> proc.time() + user system elapsed + 6.985 0.068 7.099 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2012-06-28 01:37:26
|
Revision: 1579 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1579&view=rev Author: warnes Date: 2012-06-28 01:37:19 +0000 (Thu, 28 Jun 2012) Log Message: ----------- Update saved test output files. Modified Paths: -------------- trunk/SASxport/tests/Alfalfa_Test.Rout.save trunk/SASxport/tests/Theoph.Rout.save trunk/SASxport/tests/cars.Rout.save trunk/SASxport/tests/testDates.Rout.save trunk/SASxport/tests/testNegative.Rout.save trunk/SASxport/tests/testNumeric.Rout.save trunk/SASxport/tests/testUnnamedComponents.Rout.save trunk/SASxport/tests/test_as_is.Rout.save trunk/SASxport/tests/test_fields.Rout.save trunk/SASxport/tests/xport.Rout.save trunk/SASxport/tests/xxx.Rout.save Modified: trunk/SASxport/tests/Alfalfa_Test.Rout.save =================================================================== --- trunk/SASxport/tests/Alfalfa_Test.Rout.save 2012-06-28 01:34:11 UTC (rev 1578) +++ trunk/SASxport/tests/Alfalfa_Test.Rout.save 2012-06-28 01:37:19 UTC (rev 1579) @@ -1,7 +1,8 @@ -R version 2.11.1 (2010-05-31) -Copyright (C) 2010 The R Foundation for Statistical Computing +R version 2.15.0 (2012-03-30) +Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 +Platform: i386-apple-darwin9.8.0/i386 (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. @@ -20,11 +21,8 @@ > > library(SASxport) -Loaded SASxport version 1.2.3 (2008-02-29). +Loaded SASxport version 1.3.0 (2012-06-21). - Updates and technical support available from Random Technologies, LLC - <http://random-technologies-llc.com/products/SASxport> - Type `?SASxport' for usage information. > @@ -47,3 +45,6 @@ > ## Test that the files are identical > SASxport:::assert( all(a.1 == a.2) ) > +> proc.time() + user system elapsed + 0.303 0.025 0.316 Modified: trunk/SASxport/tests/Theoph.Rout.save =================================================================== --- trunk/SASxport/tests/Theoph.Rout.save 2012-06-28 01:34:11 UTC (rev 1578) +++ trunk/SASxport/tests/Theoph.Rout.save 2012-06-28 01:37:19 UTC (rev 1579) @@ -1,7 +1,8 @@ -R version 2.11.1 (2010-05-31) -Copyright (C) 2010 The R Foundation for Statistical Computing +R version 2.15.0 (2012-03-30) +Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 +Platform: i386-apple-darwin9.8.0/i386 (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. @@ -22,11 +23,8 @@ > > library(SASxport) -Loaded SASxport version 1.2.3 (2008-02-29). +Loaded SASxport version 1.3.0 (2012-06-21). - Updates and technical support available from Random Technologies, LLC - <http://random-technologies-llc.com/products/SASxport> - Type `?SASxport' for usage information. > @@ -43,3 +41,6 @@ > SASxport:::assert( all(Theoph[,-1] == Theoph.2[,-1]) ) > > +> proc.time() + user system elapsed + 0.539 0.026 0.555 Modified: trunk/SASxport/tests/cars.Rout.save =================================================================== --- trunk/SASxport/tests/cars.Rout.save 2012-06-28 01:34:11 UTC (rev 1578) +++ trunk/SASxport/tests/cars.Rout.save 2012-06-28 01:37:19 UTC (rev 1579) @@ -1,7 +1,8 @@ -R version 2.11.1 (2010-05-31) -Copyright (C) 2010 The R Foundation for Statistical Computing +R version 2.15.0 (2012-03-30) +Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 +Platform: i386-apple-darwin9.8.0/i386 (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. @@ -17,11 +18,8 @@ > library(SASxport) -Loaded SASxport version 1.2.3 (2008-02-29). +Loaded SASxport version 1.3.0 (2012-06-21). - Updates and technical support available from Random Technologies, LLC - <http://random-technologies-llc.com/products/SASxport> - Type `?SASxport' for usage information. > @@ -64,3 +62,6 @@ > ## Test that the files are identical > SASxport:::assert( all(a.1 == a.2) ) > +> proc.time() + user system elapsed + 0.296 0.025 0.310 Modified: trunk/SASxport/tests/testDates.Rout.save =================================================================== --- trunk/SASxport/tests/testDates.Rout.save 2012-06-28 01:34:11 UTC (rev 1578) +++ trunk/SASxport/tests/testDates.Rout.save 2012-06-28 01:37:19 UTC (rev 1579) @@ -1,7 +1,8 @@ -R version 2.11.1 (2010-05-31) -Copyright (C) 2010 The R Foundation for Statistical Computing +R version 2.15.0 (2012-03-30) +Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 +Platform: i386-apple-darwin9.8.0/i386 (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. @@ -17,11 +18,8 @@ > library(SASxport) -Loaded SASxport version 1.2.3 (2008-02-29). +Loaded SASxport version 1.3.0 (2012-06-21). - Updates and technical support available from Random Technologies, LLC - <http://random-technologies-llc.com/products/SASxport> - Type `?SASxport' for usage information. > @@ -47,8 +45,7 @@ > > write.xport( DATETIME=temp, file="datetime.xpt") Warning message: -In write.xport(DATETIME = temp, file = "datetime.xpt") : - Variable names modified to obey SAS rules +In makeSASNames(colnames(df)) : Truncated 1 long names to 8 characters. > temp2 <- read.xport(file="datetime.xpt", names.tolower=FALSE) > > print(temp2) @@ -63,3 +60,6 @@ > identical(temp, temp2) [1] FALSE > +> proc.time() + user system elapsed + 0.364 0.025 0.378 Modified: trunk/SASxport/tests/testNegative.Rout.save =================================================================== --- trunk/SASxport/tests/testNegative.Rout.save 2012-06-28 01:34:11 UTC (rev 1578) +++ trunk/SASxport/tests/testNegative.Rout.save 2012-06-28 01:37:19 UTC (rev 1579) @@ -1,7 +1,8 @@ -R version 2.11.1 (2010-05-31) -Copyright (C) 2010 The R Foundation for Statistical Computing +R version 2.15.0 (2012-03-30) +Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 +Platform: i386-apple-darwin9.8.0/i386 (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. @@ -17,11 +18,8 @@ > library(SASxport) -Loaded SASxport version 1.2.3 (2008-02-29). +Loaded SASxport version 1.3.0 (2012-06-21). - Updates and technical support available from Random Technologies, LLC - <http://random-technologies-llc.com/products/SASxport> - Type `?SASxport' for usage information. > @@ -43,9 +41,11 @@ > df3 <- data.frame(x.continuous=seq(-100,100,by=0.5), x.integer=as.integer(seq(-100,100,by=0.5)) ) > write.xport(df3, file='df3.xpt') Warning message: -In write.xport(df3, file = "df3.xpt") : - Variable names modified to obey SAS rules +In makeSASNames(colnames(df)) : Truncated 2 long names to 8 characters. > df4 <- read.xport(file='df3.xpt') > > SASxport:::assert(all(df3==df4)) > +> proc.time() + user system elapsed + 0.423 0.027 0.439 Modified: trunk/SASxport/tests/testNumeric.Rout.save =================================================================== --- trunk/SASxport/tests/testNumeric.Rout.save 2012-06-28 01:34:11 UTC (rev 1578) +++ trunk/SASxport/tests/testNumeric.Rout.save 2012-06-28 01:37:19 UTC (rev 1579) @@ -1,7 +1,8 @@ -R version 2.11.1 (2010-05-31) -Copyright (C) 2010 The R Foundation for Statistical Computing +R version 2.15.0 (2012-03-30) +Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 +Platform: i386-apple-darwin9.8.0/i386 (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. @@ -17,11 +18,8 @@ > library(SASxport) -Loaded SASxport version 1.2.3 (2008-02-29). +Loaded SASxport version 1.3.0 (2012-06-21). - Updates and technical support available from Random Technologies, LLC - <http://random-technologies-llc.com/products/SASxport> - Type `?SASxport' for usage information. > @@ -87,3 +85,6 @@ 6 ZZ > > +> proc.time() + user system elapsed + 0.494 0.025 0.507 Modified: trunk/SASxport/tests/testUnnamedComponents.Rout.save =================================================================== --- trunk/SASxport/tests/testUnnamedComponents.Rout.save 2012-06-28 01:34:11 UTC (rev 1578) +++ trunk/SASxport/tests/testUnnamedComponents.Rout.save 2012-06-28 01:37:19 UTC (rev 1579) @@ -1,6 +1,6 @@ -R version 2.12.0 (2010-10-15) -Copyright (C) 2010 The R Foundation for Statistical Computing +R version 2.15.0 (2012-03-30) +Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i386-apple-darwin9.8.0/i386 (32-bit) @@ -18,11 +18,8 @@ > library(SASxport) -Loaded SASxport version 1.2.4 (2010-11-11). +Loaded SASxport version 1.3.0 (2012-06-21). - Updates and technical support available from Random Technologies, LLC - <http://random-technologies-llc.com/products/SASxport> - Type `?SASxport' for usage information. > @@ -116,22 +113,19 @@ rd.xpr> rd.xpr> > write.xport(w$test,file="a.xpt") #1.a -Warning message: -In write.xport(w$test, file = "a.xpt") : - Data frame names modified to obey SAS rules > lookup.xport("a.xpt") #1.b SAS xport file -------------- Filename: `a.xpt' -Variables in data set `W.TEST': +Variables in data set `W$TEST': dataset name type format flength fdigits iformat iflength ifdigits - W.TEST RACE character RACE 0 0 0 0 - W.TEST AGE numeric 0 0 0 0 - W.TEST D1 numeric MMDDYY 10 0 0 0 - W.TEST DT1 numeric DATETIME 0 0 0 0 - W.TEST T1 character TIME 0 0 0 0 + W$TEST RACE character RACE 0 0 0 0 + W$TEST AGE numeric 0 0 0 0 + W$TEST D1 numeric MMDDYY 10 0 0 0 + W$TEST DT1 numeric DATETIME 0 0 0 0 + W$TEST T1 character TIME 0 0 0 0 label nobs 2 Age at Beginning of Study 2 @@ -345,22 +339,19 @@ > > write.xport(w$test,w$z,file="a.xpt") #5.a -Warning message: -In write.xport(w$test, w$z, file = "a.xpt") : - Data frame names modified to obey SAS rules > lookup.xport("a.xpt") #5.b SAS xport file -------------- Filename: `a.xpt' -Variables in data set `W.TEST': +Variables in data set `W$TEST': dataset name type format flength fdigits iformat iflength ifdigits - W.TEST RACE character RACE 0 0 0 0 - W.TEST AGE numeric 0 0 0 0 - W.TEST D1 numeric MMDDYY 10 0 0 0 - W.TEST DT1 numeric DATETIME 0 0 0 0 - W.TEST T1 character TIME 0 0 0 0 + W$TEST RACE character RACE 0 0 0 0 + W$TEST AGE numeric 0 0 0 0 + W$TEST D1 numeric MMDDYY 10 0 0 0 + W$TEST DT1 numeric DATETIME 0 0 0 0 + W$TEST T1 character TIME 0 0 0 0 label nobs 2 Age at Beginning of Study 2 @@ -368,14 +359,14 @@ 2 2 -Variables in data set `W.Z': +Variables in data set `W$Z': dataset name type format flength fdigits iformat iflength ifdigits label - W.Z X3 numeric 0 0 0 0 - W.Z X4 numeric 0 0 0 0 - W.Z X5 numeric 0 0 0 0 - W.Z X6 numeric 0 0 0 0 - W.Z X7 numeric 0 0 0 0 - W.Z X8 numeric 0 0 0 0 + W$Z X3 numeric 0 0 0 0 + W$Z X4 numeric 0 0 0 0 + W$Z X5 numeric 0 0 0 0 + W$Z X6 numeric 0 0 0 0 + W$Z X7 numeric 0 0 0 0 + W$Z X8 numeric 0 0 0 0 nobs 100 100 @@ -385,12 +376,12 @@ 100 > (tmp <- read.xport("a.xpt")) #5.c -$w.test +$`w$test` RACE AGE D1 DT1 T1 1 blue 30 2002-03-03 (03 Mar 2002 04:31:02) 11:13:45 2 31 2002-06-03 (03 Jun 2002 04:42:07) 11:14:13 -$w.z +$`w$z` X3 X4 X5 X6 X7 X8 1 0.554809570 0.91026592 0.199472918 0.77819594 0.76480773 0.907832049 2 0.628906250 0.59507513 0.149382079 0.19969965 0.45795571 0.571611564 @@ -501,13 +492,13 @@ -------------- Filename: `a.xpt' -Variables in data set `W.TEST': +Variables in data set `W$TEST': dataset name type format flength fdigits iformat iflength ifdigits - W.TEST RACE character RACE 0 0 0 0 - W.TEST AGE numeric 0 0 0 0 - W.TEST D1 numeric MMDDYY 10 0 0 0 - W.TEST DT1 numeric DATETIME 0 0 0 0 - W.TEST T1 character TIME 0 0 0 0 + W$TEST RACE character RACE 0 0 0 0 + W$TEST AGE numeric 0 0 0 0 + W$TEST D1 numeric MMDDYY 10 0 0 0 + W$TEST DT1 numeric DATETIME 0 0 0 0 + W$TEST T1 character TIME 0 0 0 0 label nobs 2 Age at Beginning of Study 2 @@ -532,7 +523,7 @@ 100 > (tmp <- read.xport("a.xpt")) #6.c -$w.test +$`w$test` RACE AGE D1 DT1 T1 1 blue 30 2002-03-03 (03 Mar 2002 04:31:02) 11:13:45 2 31 2002-06-03 (03 Jun 2002 04:42:07) 11:14:13 @@ -836,22 +827,19 @@ > > names(w) <- NULL > write.xport(w[[1]],w[[2]],file="a.xpt") #8.a -Warning message: -In write.xport(w[[1]], w[[2]], file = "a.xpt") : - Data frame names modified to obey SAS rules > lookup.xport("a.xpt") #8.b SAS xport file -------------- Filename: `a.xpt' -Variables in data set `W..1..': +Variables in data set `W[[1]]': dataset name type format flength fdigits iformat iflength ifdigits - W..1.. RACE character RACE 0 0 0 0 - W..1.. AGE numeric 0 0 0 0 - W..1.. D1 numeric MMDDYY 10 0 0 0 - W..1.. DT1 numeric DATETIME 0 0 0 0 - W..1.. T1 character TIME 0 0 0 0 + W[[1]] RACE character RACE 0 0 0 0 + W[[1]] AGE numeric 0 0 0 0 + W[[1]] D1 numeric MMDDYY 10 0 0 0 + W[[1]] DT1 numeric DATETIME 0 0 0 0 + W[[1]] T1 character TIME 0 0 0 0 label nobs 2 Age at Beginning of Study 2 @@ -859,14 +847,14 @@ 2 2 -Variables in data set `W..2..': +Variables in data set `W[[2]]': dataset name type format flength fdigits iformat iflength ifdigits label - W..2.. X3 numeric 0 0 0 0 - W..2.. X4 numeric 0 0 0 0 - W..2.. X5 numeric 0 0 0 0 - W..2.. X6 numeric 0 0 0 0 - W..2.. X7 numeric 0 0 0 0 - W..2.. X8 numeric 0 0 0 0 + W[[2]] X3 numeric 0 0 0 0 + W[[2]] X4 numeric 0 0 0 0 + W[[2]] X5 numeric 0 0 0 0 + W[[2]] X6 numeric 0 0 0 0 + W[[2]] X7 numeric 0 0 0 0 + W[[2]] X8 numeric 0 0 0 0 nobs 100 100 @@ -876,12 +864,12 @@ 100 > (tmp <- read.xport("a.xpt")) #8.c -$w..1.. +$`w[[1]]` RACE AGE D1 DT1 T1 1 blue 30 2002-03-03 (03 Mar 2002 04:31:02) 11:13:45 2 31 2002-06-03 (03 Jun 2002 04:42:07) 11:14:13 -$w..2.. +$`w[[2]]` X3 X4 X5 X6 X7 X8 1 0.554809570 0.91026592 0.199472918 0.77819594 0.76480773 0.907832049 2 0.628906250 0.59507513 0.149382079 0.19969965 0.45795571 0.571611564 @@ -2174,3 +2162,6 @@ 100 0.823852539 0.12452227 0.845681194 0.08775397 0.15969781 0.854058568 > +> proc.time() + user system elapsed + 2.092 0.073 8.083 Modified: trunk/SASxport/tests/test_as_is.Rout.save =================================================================== --- trunk/SASxport/tests/test_as_is.Rout.save 2012-06-28 01:34:11 UTC (rev 1578) +++ trunk/SASxport/tests/test_as_is.Rout.save 2012-06-28 01:37:19 UTC (rev 1579) @@ -1,7 +1,8 @@ -R version 2.11.1 (2010-05-31) -Copyright (C) 2010 The R Foundation for Statistical Computing +R version 2.15.0 (2012-03-30) +Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 +Platform: i386-apple-darwin9.8.0/i386 (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. @@ -17,11 +18,8 @@ > library(SASxport) -Loaded SASxport version 1.2.3 (2008-02-29). +Loaded SASxport version 1.3.0 (2012-06-21). - Updates and technical support available from Random Technologies, LLC - <http://random-technologies-llc.com/products/SASxport> - Type `?SASxport' for usage information. > @@ -67,3 +65,6 @@ > > > +> proc.time() + user system elapsed + 0.269 0.024 0.282 Modified: trunk/SASxport/tests/test_fields.Rout.save =================================================================== --- trunk/SASxport/tests/test_fields.Rout.save 2012-06-28 01:34:11 UTC (rev 1578) +++ trunk/SASxport/tests/test_fields.Rout.save 2012-06-28 01:37:19 UTC (rev 1579) @@ -1,7 +1,8 @@ -R version 2.11.1 (2010-05-31) -Copyright (C) 2010 The R Foundation for Statistical Computing +R version 2.15.0 (2012-03-30) +Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 +Platform: i386-apple-darwin9.8.0/i386 (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. @@ -17,11 +18,8 @@ > library(SASxport) -Loaded SASxport version 1.2.3 (2008-02-29). +Loaded SASxport version 1.3.0 (2012-06-21). - Updates and technical support available from Random Technologies, LLC - <http://random-technologies-llc.com/products/SASxport> - Type `?SASxport' for usage information. > @@ -32,3 +30,6 @@ > > ## Successful completion means all SASxport:::assertions have been met > +> proc.time() + user system elapsed + 0.240 0.023 0.252 Modified: trunk/SASxport/tests/xport.Rout.save =================================================================== --- trunk/SASxport/tests/xport.Rout.save 2012-06-28 01:34:11 UTC (rev 1578) +++ trunk/SASxport/tests/xport.Rout.save 2012-06-28 01:37:19 UTC (rev 1579) @@ -1,7 +1,8 @@ -R version 2.11.1 (2010-05-31) -Copyright (C) 2010 The R Foundation for Statistical Computing +R version 2.15.0 (2012-03-30) +Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 +Platform: i386-apple-darwin9.8.0/i386 (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. @@ -17,11 +18,8 @@ > library(SASxport) -Loaded SASxport version 1.2.3 (2008-02-29). +Loaded SASxport version 1.3.0 (2012-06-21). - Updates and technical support available from Random Technologies, LLC - <http://random-technologies-llc.com/products/SASxport> - Type `?SASxport' for usage information. > @@ -106,3 +104,6 @@ Max. :40453 > > q() +> proc.time() + user system elapsed + 0.286 0.025 0.300 Modified: trunk/SASxport/tests/xxx.Rout.save =================================================================== --- trunk/SASxport/tests/xxx.Rout.save 2012-06-28 01:34:11 UTC (rev 1578) +++ trunk/SASxport/tests/xxx.Rout.save 2012-06-28 01:37:19 UTC (rev 1579) @@ -1,7 +1,8 @@ -R version 2.11.1 (2010-05-31) -Copyright (C) 2010 The R Foundation for Statistical Computing +R version 2.15.0 (2012-03-30) +Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 +Platform: i386-apple-darwin9.8.0/i386 (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. @@ -17,11 +18,8 @@ > library(SASxport) -Loaded SASxport version 1.2.3 (2008-02-29). +Loaded SASxport version 1.3.0 (2012-06-21). - Updates and technical support available from Random Technologies, LLC - <http://random-technologies-llc.com/products/SASxport> - Type `?SASxport' for usage information. > @@ -79,3 +77,6 @@ > > > +> proc.time() + user system elapsed + 0.287 0.027 0.303 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2012-06-28 01:34:18
|
Revision: 1578 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1578&view=rev Author: warnes Date: 2012-06-28 01:34:11 +0000 (Thu, 28 Jun 2012) Log Message: ----------- Remove references to Random Technologies LLC and update email address. Modified Paths: -------------- trunk/SASxport/R/zzz.R trunk/SASxport/man/SASxport-package.Rd trunk/SASxport/src/ibm2ieee.c trunk/SASxport/src/ieee2ibm.c trunk/SASxport/src/init.c trunk/SASxport/src/test_fields.c trunk/SASxport/src/writeSAS.c trunk/SASxport/src/writeSAS.h Modified: trunk/SASxport/R/zzz.R =================================================================== --- trunk/SASxport/R/zzz.R 2012-06-28 00:49:06 UTC (rev 1577) +++ trunk/SASxport/R/zzz.R 2012-06-28 01:34:11 UTC (rev 1578) @@ -5,9 +5,6 @@ date <- packageDescription("SASxport", fields="Date") cat("Loaded SASxport version ", ver, " (", date ,").\n", sep="") cat("\n") - cat(" Updates and technical support available from Random Technologies, LLC\n") - cat(" <http://random-technologies-llc.com/products/SASxport>\n") - cat("\n") cat(" Type `?SASxport' for usage information.\n") cat("\n") } Modified: trunk/SASxport/man/SASxport-package.Rd =================================================================== --- trunk/SASxport/man/SASxport-package.Rd 2012-06-28 00:49:06 UTC (rev 1577) +++ trunk/SASxport/man/SASxport-package.Rd 2012-06-28 01:34:11 UTC (rev 1578) @@ -51,11 +51,10 @@ } } \author{ - Unless otherwise noted, the contents of this package were written by - 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. + Unless otherwise noted, the contents of this package were written and + Copyright (C) 2007 by Gregory R. Warnes \email{gr...@wa...} and + are provided under the terms of the GNU General Public License, + version 2.0 or later. The file 'htond.c' is extracted from BRL-CAD \url{http://www.brlcad.org/}, written by Michael John Muuss, and is @@ -77,9 +76,4 @@ \section{Maintainer}{ Gregory R. Warnes \email{gr...@wa...} } -\section{Support}{ - Technical support contracts and other services for R, this package, - and other packages are available from Random Technologies LLC - \url{http://random-technologies-llc.com}. -} \keyword{package} Modified: trunk/SASxport/src/ibm2ieee.c =================================================================== --- trunk/SASxport/src/ibm2ieee.c 2012-06-28 00:49:06 UTC (rev 1577) +++ trunk/SASxport/src/ibm2ieee.c 2012-06-28 01:34:11 UTC (rev 1578) @@ -6,8 +6,7 @@ * Copyright (c) 2004-2007 United States Government as represented by * the U.S. Army Research Laboratory. * - * * Minor changes (c) 2007 Random Technologies LLC by Gregory R. Warnes - * <gr...@ra...> + * * Minor changes (c) 2007 by Gregory R. Warnes <gr...@wa...> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License @@ -146,7 +145,8 @@ /* After suitable testing, this check can be deleted */ if( (left & 0x00800000) == 0 ) { - fprintf(stderr,"ibm->ieee missing 1, left=x%x\n", left); + //fprintf(stderr, + error("ibm->ieee missing 1, left=x%x\n", left); left = (left<<1) | (right>>31); right <<= 1; goto ibm_normalized; Modified: trunk/SASxport/src/ieee2ibm.c =================================================================== --- trunk/SASxport/src/ieee2ibm.c 2012-06-28 00:49:06 UTC (rev 1577) +++ trunk/SASxport/src/ieee2ibm.c 2012-06-28 01:34:11 UTC (rev 1578) @@ -6,8 +6,7 @@ * Copyright (c) 2004-2007 United States Government as represented by * the U.S. Army Research Laboratory. * - * Minor changes (c) 2007 Random Technologies LLC by Gregory R. Warnes - * <gr...@ra...> + * Minor changes (c) 2007 Gregory R. Warnes <gr...@wa...> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License Modified: trunk/SASxport/src/init.c =================================================================== --- trunk/SASxport/src/init.c 2012-06-28 00:49:06 UTC (rev 1577) +++ trunk/SASxport/src/init.c 2012-06-28 01:34:11 UTC (rev 1578) @@ -2,9 +2,9 @@ * * init.c: Routines to register SASxport C routines with R * - * Author: Gregory R. Warnes <gr...@ra...> + * Author: Gregory R. Warnes <gr...@wa...> * - * Copyright (C) 2007 Random Technologies LLC + * Copyright (C) 2007 Gregory R. Warnes * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: trunk/SASxport/src/test_fields.c =================================================================== --- trunk/SASxport/src/test_fields.c 2012-06-28 00:49:06 UTC (rev 1577) +++ trunk/SASxport/src/test_fields.c 2012-06-28 01:34:11 UTC (rev 1578) @@ -2,9 +2,9 @@ * * test_fields.c: Unit test routines for writeSAS.c functions. * - * Author: Gregory R. Warnes <gr...@ra...> + * Author: Gregory R. Warnes <gr...@wa...> * - * Copyright (C) 2007 Random Technologies LLC + * Copyright (C) 2007 Gregory R. Warnes * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: trunk/SASxport/src/writeSAS.c =================================================================== --- trunk/SASxport/src/writeSAS.c 2012-06-28 00:49:06 UTC (rev 1577) +++ trunk/SASxport/src/writeSAS.c 2012-06-28 01:34:11 UTC (rev 1578) @@ -2,9 +2,9 @@ * * writeSAS.c: Routines for writing SAS XPT formatted files * - * Author: Gregory R. Warnes <gr...@ra...> + * Author: Gregory R. Warnes <gr...@wa...> * - * Copyright (C) 2007 Random Technologies LLC + * Copyright (C) 2007 Gregory R. Warnes <gr...@wa...> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by Modified: trunk/SASxport/src/writeSAS.h =================================================================== --- trunk/SASxport/src/writeSAS.h 2012-06-28 00:49:06 UTC (rev 1577) +++ trunk/SASxport/src/writeSAS.h 2012-06-28 01:34:11 UTC (rev 1578) @@ -2,9 +2,9 @@ * * writeSAS.h: Routines for writing SAS XPT formatted files * - * Author: Gregory R. Warnes <gr...@ra...> + * Author: Gregory R. Warnes <gr...@wa...> * - * Copyright (C) 2007 Random Technologies LLC + * Copyright (C) 2007 Gregory R. Warnes <gr...@wa...> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2012-06-28 00:49:12
|
Revision: 1577 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1577&view=rev Author: warnes Date: 2012-06-28 00:49:06 +0000 (Thu, 28 Jun 2012) Log Message: ----------- Update for gmodels version 2.15.3. Modified Paths: -------------- trunk/gmodels/DESCRIPTION trunk/gmodels/inst/NEWS Modified: trunk/gmodels/DESCRIPTION =================================================================== --- trunk/gmodels/DESCRIPTION 2012-06-28 00:47:23 UTC (rev 1576) +++ trunk/gmodels/DESCRIPTION 2012-06-28 00:49:06 UTC (rev 1577) @@ -1,6 +1,6 @@ Package: gmodels -Version: 2.15.2 -Date: 2012-04-19 +Version: 2.15.3 +Date: 2012-06-27 Title: Various R programming tools for model fitting Author: Gregory R. Warnes. Includes R source code and/or documentation contributed by Ben Bolker, Thomas Lumley, and Randall C @@ -11,7 +11,7 @@ Maintainer: Gregory R. Warnes <gr...@wa...> Description: Various R programming tools for model fitting Depends: R (>= 1.9.0) -Suggests: gplots, gtools, Matrix, nlme, lme4 +Suggests: gplots, gtools, Matrix, nlme, lme4 (>= 0.999999-0) Imports: MASS, gdata License: GPL-2 URL: http://cran.r-project.org/src/contrib/PACKAGES.html Modified: trunk/gmodels/inst/NEWS =================================================================== --- trunk/gmodels/inst/NEWS 2012-06-28 00:47:23 UTC (rev 1576) +++ trunk/gmodels/inst/NEWS 2012-06-28 00:49:06 UTC (rev 1577) @@ -1,3 +1,12 @@ +Version 2.15.3 - 2012-06-27 +--------------------------- + +Bug fixes: + +- Update est.mer() to work with "mer" object changes introduced in + lme4 version 0.999999-0. + + Version 2.15.2 - 2012-04-19 --------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2012-06-28 00:47:29
|
Revision: 1576 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1576&view=rev Author: warnes Date: 2012-06-28 00:47:23 +0000 (Thu, 28 Jun 2012) Log Message: ----------- Move percentile() function to a separate file. Added Paths: ----------- trunk/gmodels/R/percentile.R Added: trunk/gmodels/R/percentile.R =================================================================== --- trunk/gmodels/R/percentile.R (rev 0) +++ trunk/gmodels/R/percentile.R 2012-06-28 00:47:23 UTC (rev 1576) @@ -0,0 +1,9 @@ +percentile <- function(x, distn, include.observed=FALSE) +{ + if(include.observed) + distn <- c(x, distn) + + n <- length(distn) + + return(findInterval(x, distn[order(distn)]) / n) +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2012-06-28 00:41:32
|
Revision: 1575 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1575&view=rev Author: warnes Date: 2012-06-28 00:41:26 +0000 (Thu, 28 Jun 2012) Log Message: ----------- Update est.mer() to support new S4 "mer" class. Modified Paths: -------------- trunk/gmodels/R/est.mer.R Removed Paths: ------------- trunk/gmodels/R/est.lmer.R Deleted: trunk/gmodels/R/est.lmer.R =================================================================== --- trunk/gmodels/R/est.lmer.R 2012-06-28 00:40:29 UTC (rev 1574) +++ trunk/gmodels/R/est.lmer.R 2012-06-28 00:41:26 UTC (rev 1575) @@ -1,70 +0,0 @@ -# est.lmer.R -# generate estimable output for lmer objects using mcmcsamp() -# Randall Johnson -# Laboratory of Genomic Diversity at NCI Frederick -# SAIC Frederick, Inc -# Created April 25, 2006 - -est.lmer <- function(obj, cm, beta0, conf.int, show.beta0, n.sim) -{ -## if(!require(coda, quietly=TRUE)) -## stop("coda package required when sim.lmer == TRUE") - - samp <- mcmcsamp(obj, n.sim) - samp.summ <- summary(samp) - - if(is.null(dim(cm))) - n <- length(cm) - else - n <- dim(cm)[2] - # drop extra information on end - samp.cm <- as.matrix(samp)[, 1:n] %*% t(cm) - - # calculate requested statistics - est <- drop(cm %*% samp.summ$statistics[1:n,1]) - stderr <- sd(samp.cm) - - pval <- sapply(1:length(beta0), - function(i){percentile(beta0[i], samp.cm[,i])}) - pval <- ifelse(pval <= .5, 2*pval, 2*(1-pval)) - - if(is.null(conf.int)) - { - lower.ci <- NULL - upper.ci <- NULL - }else{ - alpha <- 1-conf.int - samp.ci <- sapply(1:length(beta0), - function(i) - { - quantile(samp.cm[,i], probs=c(alpha/2, 1-alpha/2)) - } - ) - - lower.ci <- samp.ci[1,] - upper.ci <- samp.ci[2,] - } - - # return results - if(!show.beta0) - beta0 <- NULL - - samp.stats <- cbind('beta0' = beta0, - 'Estimate' = est, - 'Std. Error' = stderr, - 'p value' = pval, - 'Lower.CI' = lower.ci, - 'Upper.CI' = upper.ci) - - row.names(samp.stats) <- paste('(', apply(cm, 1, paste, collapse=" "), - ')', sep='') - - return(samp.stats) -} - -percentile <- function(x, distn) -{ - n <- length(distn) - - return(findInterval(x, distn[order(distn)]) / n) -} Modified: trunk/gmodels/R/est.mer.R =================================================================== --- trunk/gmodels/R/est.mer.R 2012-06-28 00:40:29 UTC (rev 1574) +++ trunk/gmodels/R/est.mer.R 2012-06-28 00:41:26 UTC (rev 1575) @@ -9,17 +9,11 @@ est.mer <- function(obj, cm, beta0, conf.int, show.beta0, n.sim) { - samp <- mcmcsamp(obj, n.sim) + samp <- lme4:::mcmcsamp(obj, n.sim) ## samp.summ <- summary(samp) - if(is.null(dim(cm))) - n <- length(cm) - else - n <- dim(cm)[2] + samp.cm <- t(cm %*% samp@fixef) - ## drop extra information on end - samp.cm <- t(samp@fixef)[1:n,, drop=FALSE] %*% cm - # calculate requested statistics est <- apply(samp.cm, 2, mean) stderr <- apply(samp.cm, 2, sd) @@ -64,12 +58,3 @@ return(samp.stats) } -percentile <- function(x, distn, include.observed=FALSE) -{ - if(include.observed) - distn <- c(x, distn) - - n <- length(distn) - - return(findInterval(x, distn[order(distn)]) / n) -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2012-06-28 00:40:36
|
Revision: 1574 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1574&view=rev Author: warnes Date: 2012-06-28 00:40:29 +0000 (Thu, 28 Jun 2012) Log Message: ----------- Make lme4 example executable. Modified Paths: -------------- trunk/gmodels/man/ci.Rd Modified: trunk/gmodels/man/ci.Rd =================================================================== --- trunk/gmodels/man/ci.Rd 2012-06-27 22:42:43 UTC (rev 1573) +++ trunk/gmodels/man/ci.Rd 2012-06-28 00:40:29 UTC (rev 1574) @@ -66,12 +66,12 @@ reg <- lm(Area ~ Population, data=as.data.frame(state.x77)) ci(reg) -\dontrun{ +%\dontrun{ # mer example library(lme4) fm2 <- lmer(Reaction ~ Days + (1|Subject) + (0+Days|Subject), sleepstudy) ci(fm2) -} +%} } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2012-06-27 22:42:50
|
Revision: 1573 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1573&view=rev Author: warnes Date: 2012-06-27 22:42:43 +0000 (Wed, 27 Jun 2012) Log Message: ----------- Add test code submitted by Ari...@or.... Modified Paths: -------------- trunk/gmodels/test/lme-test.R Modified: trunk/gmodels/test/lme-test.R =================================================================== --- trunk/gmodels/test/lme-test.R 2012-06-21 23:13:08 UTC (rev 1572) +++ trunk/gmodels/test/lme-test.R 2012-06-27 22:42:43 UTC (rev 1573) @@ -1,5 +1,6 @@ library(gmodels) library(lme4) +set.seed(314159) sleepstudy$dayGroup <- cut(sleepstudy$Days, seq(-1,9,by=2), include=T) @@ -21,3 +22,55 @@ ), conf=0.95 ) +# Example from Ari...@or... +homerange=c( + "male","1","fall","0.1", + "male","1","winter","0.3", + "male","1","spring","5.2", + "male","1","summer","3.1", + "male","2","fall","3.4", + "male","2","winter","1.3", + "male","2","spring","4.8", + "male","2","summer","4.3", + "male","3","fall","3.9", + "male","3","winter","3.8", + "male","3","spring","5.7", + "male","3","summer","2.0", + "male","4","fall","3.7", + "male","4","winter","4.3", + "male","4","spring","6.0", + "male","4","summer","1.8", + "female","5","fall","4.3", + "female","5","winter","1.9", + "female","5","spring","7.2", + "female","5","summer","6.9", + "female","6","fall","5.3", + "female","6","winter","4.3", + "female","6","spring","6.2", + "female","6","summer","4.8", + "female","7","fall","7.1", + "female","7","winter","4.9", + "female","7","spring","8.3", + "female","7","summer","7.7" + ) + +homerange <- data.frame(matrix(homerange,ncol=4, byrow=T)) +names(homerange) <- c("sex", "animal", "season", "area") +homerange$area = as.numeric(as.character(homerange$area)) + +fit1 <- lmer(area ~ sex*season + (1|animal), data=homerange) +summary(fit1) +anova(fit1) + + +#matrix to give estimable for making estimates + +spr <- rbind(c(1,0,1,0,0,0,0,0), + c(1,1,0,0,0,1,0,0), + c(1,0,0,1,0,0,0,0), + c(1,1,0,0,0,0,1,0), + c(1,0,0,0,1,0,0,0), + c(1,1,0,0,0,0,0,1)) + + +estimable(fit1, spr) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2012-06-21 23:13:17
|
Revision: 1572 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1572&view=rev Author: warnes Date: 2012-06-21 23:13:08 +0000 (Thu, 21 Jun 2012) Log Message: ----------- Standardize file capitalization Added Paths: ----------- trunk/SASxport/tests/testUnnamedComponents.Rout.save Removed Paths: ------------- trunk/SASxport/tests/TestUnnamedComponents.Rout.save Deleted: trunk/SASxport/tests/TestUnnamedComponents.Rout.save =================================================================== --- trunk/SASxport/tests/TestUnnamedComponents.Rout.save 2012-06-21 23:12:34 UTC (rev 1571) +++ trunk/SASxport/tests/TestUnnamedComponents.Rout.save 2012-06-21 23:13:08 UTC (rev 1572) @@ -1,2176 +0,0 @@ - -R version 2.12.0 (2010-10-15) -Copyright (C) 2010 The R Foundation for Statistical Computing -ISBN 3-900051-07-0 -Platform: i386-apple-darwin9.8.0/i386 (32-bit) - -R is free software and comes with ABSOLUTELY NO WARRANTY. -You are welcome to redistribute it under certain conditions. -Type 'license()' or 'licence()' for distribution details. - -R is a collaborative project with many contributors. -Type 'contributors()' for more information and -'citation()' on how to cite R or R packages in publications. - -Type 'demo()' for some demos, 'help()' for on-line help, or -'help.start()' for an HTML browser interface to help. -Type 'q()' to quit R. - -> library(SASxport) - -Loaded SASxport version 1.2.4 (2010-11-11). - - Updates and technical support available from Random Technologies, LLC - <http://random-technologies-llc.com/products/SASxport> - - Type `?SASxport' for usage information. - -> -> -> ##tests -> example(read.xport) - -rd.xpr> # ------- -rd.xpr> # SAS code to generate test dataset: -rd.xpr> # ------- -rd.xpr> # libname y SASV5XPT "test2.xpt"; -rd.xpr> # -rd.xpr> # PROC FORMAT; VALUE race 1=green 2=blue 3=purple; RUN; -rd.xpr> # PROC FORMAT CNTLOUT=format;RUN; * Name, e.g. 'format', unimportant; -rd.xpr> # data test; -rd.xpr> # LENGTH race 3 age 4; -rd.xpr> # age=30; label age="Age at Beginning of Study"; -rd.xpr> # race=2; -rd.xpr> # d1='3mar2002'd ; -rd.xpr> # dt1='3mar2002 9:31:02'dt; -rd.xpr> # t1='11:13:45't; -rd.xpr> # output; -rd.xpr> # -rd.xpr> # age=31; -rd.xpr> # race=4; -rd.xpr> # d1='3jun2002'd ; -rd.xpr> # dt1='3jun2002 9:42:07'dt; -rd.xpr> # t1='11:14:13't; -rd.xpr> # output; -rd.xpr> # format d1 mmddyy10. dt1 datetime. t1 time. race race.; -rd.xpr> # run; -rd.xpr> # data z; LENGTH x3 3 x4 4 x5 5 x6 6 x7 7 x8 8; -rd.xpr> # DO i=1 TO 100; -rd.xpr> # x3=ranuni(3); -rd.xpr> # x4=ranuni(5); -rd.xpr> # x5=ranuni(7); -rd.xpr> # x6=ranuni(9); -rd.xpr> # x7=ranuni(11); -rd.xpr> # x8=ranuni(13); -rd.xpr> # output; -rd.xpr> # END; -rd.xpr> # DROP i; -rd.xpr> # RUN; -rd.xpr> # PROC MEANS; RUN; -rd.xpr> # PROC COPY IN=work OUT=y;SELECT test format z;RUN; *Creates test2.xpt; -rd.xpr> # ------ -rd.xpr> -rd.xpr> # Read this dataset from a local file: -rd.xpr> ## Not run: -rd.xpr> ##D w <- read.xport('test2.xpt') -rd.xpr> ## End(Not run) -rd.xpr> -rd.xpr> # Or read a copy of test2.xpt available on the web: -rd.xpr> host <- 'http://biostat.mc.vanderbilt.edu' - -rd.xpr> path <- '/cgi-bin/viewvc.cgi/*checkout*/Hmisc/trunk/tests/test2.xpt' - -rd.xpr> url <- paste(host,path,sep="") - -rd.xpr> w <- read.xport(url) - -rd.xpr> # We can also get the dataset wrapped in a list -rd.xpr> w <- read.xport(url, as.list=TRUE) - -rd.xpr> # And we can ask for the format information to be included as well. -rd.xpr> w <- read.xport(url, as.list=TRUE, include.formats=TRUE) - -rd.xpr> ## Don't show: -rd.xpr> SASxport:::assert( is.data.frame(w)==FALSE && is.list(w)==TRUE ) - -rd.xpr> ## End Don't show -rd.xpr> -rd.xpr> -rd.xpr> ## Not run: -rd.xpr> ##D ## The Hmisc library provides many useful functions for interacting with -rd.xpr> ##D ## data imported from SAS via read.xport() -rd.xpr> ##D library(Hmisc) -rd.xpr> ##D -rd.xpr> ##D describe(w$test) # see labels, format names for dataset test -rd.xpr> ##D lapply(w, describe)# see descriptive stats in more detaiil for each variable -rd.xpr> ##D -rd.xpr> ##D contents(w$test) # another way to see variable attributes -rd.xpr> ##D lapply(w, contents)# show contents of individual items in more detail -rd.xpr> ##D -rd.xpr> ##D options(digits=7) # compare the following matrix with PROC MEANS output -rd.xpr> ##D t(sapply(w$z, function(x) -rd.xpr> ##D c(Mean=mean(x),SD=sqrt(var(x)),Min=min(x),Max=max(x)))) -rd.xpr> ## End(Not run) -rd.xpr> -rd.xpr> -rd.xpr> -rd.xpr> -> write.xport(w$test,file="a.xpt") #1.a -Warning message: -In write.xport(w$test, file = "a.xpt") : - Data frame names modified to obey SAS rules -> lookup.xport("a.xpt") #1.b - -SAS xport file --------------- -Filename: `a.xpt' - -Variables in data set `W.TEST': - dataset name type format flength fdigits iformat iflength ifdigits - W.TEST RACE character RACE 0 0 0 0 - W.TEST AGE numeric 0 0 0 0 - W.TEST D1 numeric MMDDYY 10 0 0 0 - W.TEST DT1 numeric DATETIME 0 0 0 0 - W.TEST T1 character TIME 0 0 0 0 - label nobs - 2 - Age at Beginning of Study 2 - 2 - 2 - 2 - -> (tmp <- read.xport("a.xpt")) #1.c - RACE AGE D1 DT1 T1 -1 blue 30 2002-03-03 (03 Mar 2002 04:31:02) 11:13:45 -2 31 2002-06-03 (03 Jun 2002 04:42:07) 11:14:13 -> -> b <- w$test -> write.xport(b,file="a.xpt") #2.a -> lookup.xport("a.xpt") #2.b - -SAS xport file --------------- -Filename: `a.xpt' - -Variables in data set `B': - dataset name type format flength fdigits iformat iflength ifdigits - B RACE character RACE 0 0 0 0 - B AGE numeric 0 0 0 0 - B D1 numeric MMDDYY 10 0 0 0 - B DT1 numeric DATETIME 0 0 0 0 - B T1 character TIME 0 0 0 0 - label nobs - 2 - Age at Beginning of Study 2 - 2 - 2 - 2 - -> (tmp <- read.xport("a.xpt")) #2.c - RACE AGE D1 DT1 T1 -1 blue 30 2002-03-03 (03 Mar 2002 04:31:02) 11:13:45 -2 31 2002-06-03 (03 Jun 2002 04:42:07) 11:14:13 -> -> write.xport(test=w$test,file="a.xpt") #3.a -> lookup.xport("a.xpt") #3.b - -SAS xport file --------------- -Filename: `a.xpt' - -Variables in data set `TEST': - dataset name type format flength fdigits iformat iflength ifdigits - TEST RACE character RACE 0 0 0 0 - TEST AGE numeric 0 0 0 0 - TEST D1 numeric MMDDYY 10 0 0 0 - TEST DT1 numeric DATETIME 0 0 0 0 - TEST T1 character TIME 0 0 0 0 - label nobs - 2 - Age at Beginning of Study 2 - 2 - 2 - 2 - -> (tmp <- read.xport("a.xpt")) #3.c - RACE AGE D1 DT1 T1 -1 blue 30 2002-03-03 (03 Mar 2002 04:31:02) 11:13:45 -2 31 2002-06-03 (03 Jun 2002 04:42:07) 11:14:13 -> -> write.xport(test=w$test,z=w$z,file="a.xpt") #4.a -> lookup.xport("a.xpt") #4.b - -SAS xport file --------------- -Filename: `a.xpt' - -Variables in data set `TEST': - dataset name type format flength fdigits iformat iflength ifdigits - TEST RACE character RACE 0 0 0 0 - TEST AGE numeric 0 0 0 0 - TEST D1 numeric MMDDYY 10 0 0 0 - TEST DT1 numeric DATETIME 0 0 0 0 - TEST T1 character TIME 0 0 0 0 - label nobs - 2 - Age at Beginning of Study 2 - 2 - 2 - 2 - -Variables in data set `Z': - dataset name type format flength fdigits iformat iflength ifdigits label - Z X3 numeric 0 0 0 0 - Z X4 numeric 0 0 0 0 - Z X5 numeric 0 0 0 0 - Z X6 numeric 0 0 0 0 - Z X7 numeric 0 0 0 0 - Z X8 numeric 0 0 0 0 - nobs - 100 - 100 - 100 - 100 - 100 - 100 - -> (tmp <- read.xport("a.xpt")) #4.c -$test - RACE AGE D1 DT1 T1 -1 blue 30 2002-03-03 (03 Mar 2002 04:31:02) 11:13:45 -2 31 2002-06-03 (03 Jun 2002 04:42:07) 11:14:13 - -$z - X3 X4 X5 X6 X7 X8 -1 0.554809570 0.91026592 0.199472918 0.77819594 0.76480773 0.907832049 -2 0.628906250 0.59507513 0.149382079 0.19969965 0.45795571 0.571611564 -3 0.560180664 0.20155370 0.871071571 0.89158189 0.81783537 0.069788893 -4 0.930175781 0.67952251 0.064709651 0.23829160 0.67566234 0.861676832 -5 0.427307129 0.53496075 0.903572354 0.77109401 0.74774458 0.131040108 -6 0.185058594 0.51981020 0.793640781 0.78736015 0.76898101 0.891668539 -7 0.173126221 0.41728735 0.038577245 0.50426505 0.49957831 0.613314660 -8 0.896362305 0.80392504 0.701412492 0.70635040 0.14863697 0.406764784 -9 0.533935547 0.29961348 0.528317338 0.99510797 0.21445599 0.373646303 -10 0.360412598 0.59865904 0.724511519 0.21542188 0.31943661 0.148101144 -11 0.567138672 0.03009592 0.068136962 0.13866363 0.81119381 0.337979215 -12 0.840698242 0.13869596 0.309818228 0.52551615 0.80671759 0.844569556 -13 0.262084961 0.21521139 0.075481503 0.13430464 0.56954970 0.443899054 -14 0.685424805 0.81032562 0.975597342 0.70753509 0.12778332 0.317631773 -15 0.752197266 0.57752514 0.195447854 0.71567068 0.72801126 0.563829176 -16 0.993896484 0.09662127 0.364689407 0.54199747 0.81191797 0.959635779 -17 0.264099121 0.11393309 0.812418848 0.28320176 0.46030928 0.530359364 -18 0.630615234 0.80165958 0.918073907 0.19114500 0.04715550 0.297804402 -19 0.630126953 0.83771992 0.658738920 0.20772481 0.11557381 0.936940561 -20 0.671508789 0.62512779 0.713715522 0.27031328 0.44528787 0.076310964 -21 0.451599121 0.97465801 0.088417932 0.56017806 0.08855998 0.131952559 -22 0.531616211 0.13582230 0.125990903 0.68861063 0.05864216 0.657296563 -23 0.745361328 0.52416706 0.138287167 0.93139657 0.93634337 0.279499571 -24 0.860229492 0.23535800 0.067773213 0.55205996 0.86140652 0.580399050 -25 0.885864258 0.89300871 0.154446173 0.05930633 0.47589580 0.489967297 -26 0.133148193 0.61039686 0.236988616 0.43535325 0.67330840 0.042648594 -27 0.106369019 0.47435546 0.894045589 0.71908408 0.91220874 0.777561118 -28 0.321899414 0.82515574 0.345769540 0.27898190 0.37587550 0.221321993 -29 0.584350586 0.45017719 0.256426542 0.55128526 0.99790806 0.116743046 -30 0.782714844 0.88925648 0.672125481 0.44156701 0.77192310 0.389772559 -31 0.255737305 0.76892853 0.691356288 0.24103043 0.30677701 0.010585836 -32 0.268127441 0.49482346 0.566317322 0.80006739 0.53679024 0.787674241 -33 0.132080078 0.55090714 0.066530403 0.35998585 0.50696324 0.892336901 -34 0.209716797 0.87050629 0.265810063 0.34237937 0.99317888 0.516304360 -35 0.731567383 0.80692101 0.868052749 0.41159689 0.81571351 0.670747127 -36 0.974731445 0.05395064 0.043045310 0.30307713 0.82485616 0.613199657 -37 0.060417175 0.93399811 0.892186217 0.54169906 0.80318660 0.918251223 -38 0.053512573 0.45821238 0.997252798 0.18699222 0.74571744 0.118700152 -39 0.274291992 0.15809727 0.456446022 0.81648360 0.93111440 0.607009959 -40 0.902587891 0.92125559 0.663786719 0.67212570 0.81908712 0.803353309 -41 0.107711792 0.39496422 0.157332692 0.34387862 0.81230429 0.606811568 -42 0.264343262 0.35475087 0.116596107 0.21385085 0.33521056 0.911987601 -43 0.717773438 0.92168236 0.860613002 0.26366805 0.50917660 0.285974402 -44 0.298767090 0.97046804 0.715277340 0.40017026 0.53598483 0.602097132 -45 0.838989258 0.43197370 0.872493969 0.93329615 0.55644537 0.399561767 -46 0.547485352 0.87380695 0.425328480 0.84611454 0.91989352 0.449281177 -47 0.951660156 0.55768442 0.701688468 0.69816831 0.07641118 0.280890167 -48 0.438110352 0.67539835 0.596034631 0.31697085 0.97244354 0.052248614 -49 0.360046387 0.84610510 0.208412720 0.62072056 0.59479764 0.122431251 -50 0.055969238 0.76994514 0.313554974 0.71819807 0.62459766 0.170687066 -51 0.409973145 0.02636161 0.004133753 0.43609714 0.56356174 0.735989964 -52 0.835083008 0.06974322 0.933788894 0.25459031 0.68429414 0.836456893 -53 0.328552246 0.95790482 0.581586711 0.96089912 0.64085773 0.649938160 -54 0.153930664 0.10510141 0.862072270 0.82662339 0.84238057 0.104127737 -55 0.360107422 0.57847071 0.425726887 0.64190236 0.66252058 0.930490654 -56 0.169525146 0.91843414 0.262370519 0.47529812 0.62708726 0.655481011 -57 0.915771484 0.70346546 0.545828892 0.59429612 0.21518204 0.868149194 -58 0.194366455 0.85970068 0.682605598 0.28758652 0.08545504 0.044229804 -59 0.262573242 0.02926101 0.503761623 0.72549339 0.82246938 0.239758181 -60 0.890747070 0.46807122 0.086424077 0.19262842 0.35845780 0.013044060 -61 0.934326172 0.94439077 0.478865772 0.21141539 0.85893385 0.039905848 -62 0.015239716 0.02890442 0.531706404 0.91962052 0.96377103 0.279689568 -63 0.363159180 0.98267412 0.382022258 0.09035326 0.53721446 0.278258128 -64 0.533203125 0.09129518 0.864049435 0.21085775 0.74247024 0.520784463 -65 0.812866211 0.92549849 0.326250156 0.03063606 0.37242442 0.681011943 -66 0.821655273 0.93953514 0.730109224 0.56800164 0.36850434 0.135115089 -67 0.495239258 0.18656993 0.703959208 0.91950956 0.37737182 0.331145230 -68 0.026271820 0.28924441 0.370986423 0.46839579 0.26069062 0.496386772 -69 0.961181641 0.07934558 0.370282067 0.01009577 0.91984033 0.250117553 -70 0.867187500 0.62807846 0.297433884 0.42768580 0.67836226 0.055045441 -71 0.634155273 0.45481491 0.366012510 0.46006086 0.62342353 0.553148303 -72 0.529907227 0.22573161 0.255918004 0.81299654 0.48340851 0.388373295 -73 0.969482422 0.06762362 0.233285627 0.28913314 0.40695817 0.379425337 -74 0.322631836 0.16369033 0.696140964 0.23542822 0.44133423 0.353194184 -75 0.980957031 0.88483143 0.904902402 0.40588630 0.43244408 0.104077954 -76 0.381713867 0.33405781 0.008811487 0.85152244 0.97412609 0.427583363 -77 0.352050781 0.81973124 0.882616673 0.97839957 0.91734389 0.705771805 -78 0.236816406 0.13472927 0.039259837 0.18197673 0.83403650 0.871165875 -79 0.216461182 0.39390779 0.689487964 0.52816572 0.18237391 0.328639985 -80 0.579467773 0.16152561 0.799306294 0.01943226 0.19664442 0.494486603 -81 0.213165283 0.49794507 0.903515683 0.82634666 0.95104984 0.512989034 -82 0.369934082 0.48608422 0.740175959 0.22198786 0.88631389 0.958679024 -83 0.023796082 0.34724808 0.996114468 0.41663422 0.13658224 0.809843882 -84 0.390930176 0.94919586 0.265328477 0.42259452 0.18362993 0.018595368 -85 0.171417236 0.26409721 0.171493893 0.43668409 0.29935710 0.788430851 -86 0.980102539 0.42689586 0.197483132 0.61358141 0.66990291 0.453710159 -87 0.656982422 0.36696911 0.047739081 0.27451939 0.18052140 0.054421855 -88 0.488464355 0.91196012 0.845107406 0.83929407 0.90409508 0.544446660 -89 0.314025879 0.50865173 0.984073751 0.74795267 0.57416734 0.370512281 -90 0.805297852 0.37908387 0.390562004 0.36959290 0.51052391 0.633604296 -91 0.471252441 0.43228960 0.225722159 0.80595341 0.16973734 0.474416345 -92 0.539428711 0.33449984 0.007872077 0.28196563 0.04201044 0.666856505 -93 0.825561523 0.27042723 0.774102103 0.16982144 0.04986308 0.830708595 -94 0.005760193 0.06863922 0.413105001 0.80787951 0.81871474 0.565592853 -95 0.623413086 0.09422225 0.729800716 0.35120569 0.16269988 0.935669079 -96 0.963989258 0.96828461 0.043478839 0.90069377 0.50886120 0.842695923 -97 0.421020508 0.16918373 0.196973316 0.52296367 0.20205632 0.007268806 -98 0.313354492 0.58946466 0.881128855 0.73021358 0.38516078 0.459060744 -99 0.963256836 0.91588259 0.873051692 0.97309719 0.75135814 0.770613592 -100 0.823852539 0.12452227 0.845681194 0.08775397 0.15969781 0.854058568 - -> -> write.xport(w$test,w$z,file="a.xpt") #5.a -Warning message: -In write.xport(w$test, w$z, file = "a.xpt") : - Data frame names modified to obey SAS rules -> lookup.xport("a.xpt") #5.b - -SAS xport file --------------- -Filename: `a.xpt' - -Variables in data set `W.TEST': - dataset name type format flength fdigits iformat iflength ifdigits - W.TEST RACE character RACE 0 0 0 0 - W.TEST AGE numeric 0 0 0 0 - W.TEST D1 numeric MMDDYY 10 0 0 0 - W.TEST DT1 numeric DATETIME 0 0 0 0 - W.TEST T1 character TIME 0 0 0 0 - label nobs - 2 - Age at Beginning of Study 2 - 2 - 2 - 2 - -Variables in data set `W.Z': - dataset name type format flength fdigits iformat iflength ifdigits label - W.Z X3 numeric 0 0 0 0 - W.Z X4 numeric 0 0 0 0 - W.Z X5 numeric 0 0 0 0 - W.Z X6 numeric 0 0 0 0 - W.Z X7 numeric 0 0 0 0 - W.Z X8 numeric 0 0 0 0 - nobs - 100 - 100 - 100 - 100 - 100 - 100 - -> (tmp <- read.xport("a.xpt")) #5.c -$w.test - RACE AGE D1 DT1 T1 -1 blue 30 2002-03-03 (03 Mar 2002 04:31:02) 11:13:45 -2 31 2002-06-03 (03 Jun 2002 04:42:07) 11:14:13 - -$w.z - X3 X4 X5 X6 X7 X8 -1 0.554809570 0.91026592 0.199472918 0.77819594 0.76480773 0.907832049 -2 0.628906250 0.59507513 0.149382079 0.19969965 0.45795571 0.571611564 -3 0.560180664 0.20155370 0.871071571 0.89158189 0.81783537 0.069788893 -4 0.930175781 0.67952251 0.064709651 0.23829160 0.67566234 0.861676832 -5 0.427307129 0.53496075 0.903572354 0.77109401 0.74774458 0.131040108 -6 0.185058594 0.51981020 0.793640781 0.78736015 0.76898101 0.891668539 -7 0.173126221 0.41728735 0.038577245 0.50426505 0.49957831 0.613314660 -8 0.896362305 0.80392504 0.701412492 0.70635040 0.14863697 0.406764784 -9 0.533935547 0.29961348 0.528317338 0.99510797 0.21445599 0.373646303 -10 0.360412598 0.59865904 0.724511519 0.21542188 0.31943661 0.148101144 -11 0.567138672 0.03009592 0.068136962 0.13866363 0.81119381 0.337979215 -12 0.840698242 0.13869596 0.309818228 0.52551615 0.80671759 0.844569556 -13 0.262084961 0.21521139 0.075481503 0.13430464 0.56954970 0.443899054 -14 0.685424805 0.81032562 0.975597342 0.70753509 0.12778332 0.317631773 -15 0.752197266 0.57752514 0.195447854 0.71567068 0.72801126 0.563829176 -16 0.993896484 0.09662127 0.364689407 0.54199747 0.81191797 0.959635779 -17 0.264099121 0.11393309 0.812418848 0.28320176 0.46030928 0.530359364 -18 0.630615234 0.80165958 0.918073907 0.19114500 0.04715550 0.297804402 -19 0.630126953 0.83771992 0.658738920 0.20772481 0.11557381 0.936940561 -20 0.671508789 0.62512779 0.713715522 0.27031328 0.44528787 0.076310964 -21 0.451599121 0.97465801 0.088417932 0.56017806 0.08855998 0.131952559 -22 0.531616211 0.13582230 0.125990903 0.68861063 0.05864216 0.657296563 -23 0.745361328 0.52416706 0.138287167 0.93139657 0.93634337 0.279499571 -24 0.860229492 0.23535800 0.067773213 0.55205996 0.86140652 0.580399050 -25 0.885864258 0.89300871 0.154446173 0.05930633 0.47589580 0.489967297 -26 0.133148193 0.61039686 0.236988616 0.43535325 0.67330840 0.042648594 -27 0.106369019 0.47435546 0.894045589 0.71908408 0.91220874 0.777561118 -28 0.321899414 0.82515574 0.345769540 0.27898190 0.37587550 0.221321993 -29 0.584350586 0.45017719 0.256426542 0.55128526 0.99790806 0.116743046 -30 0.782714844 0.88925648 0.672125481 0.44156701 0.77192310 0.389772559 -31 0.255737305 0.76892853 0.691356288 0.24103043 0.30677701 0.010585836 -32 0.268127441 0.49482346 0.566317322 0.80006739 0.53679024 0.787674241 -33 0.132080078 0.55090714 0.066530403 0.35998585 0.50696324 0.892336901 -34 0.209716797 0.87050629 0.265810063 0.34237937 0.99317888 0.516304360 -35 0.731567383 0.80692101 0.868052749 0.41159689 0.81571351 0.670747127 -36 0.974731445 0.05395064 0.043045310 0.30307713 0.82485616 0.613199657 -37 0.060417175 0.93399811 0.892186217 0.54169906 0.80318660 0.918251223 -38 0.053512573 0.45821238 0.997252798 0.18699222 0.74571744 0.118700152 -39 0.274291992 0.15809727 0.456446022 0.81648360 0.93111440 0.607009959 -40 0.902587891 0.92125559 0.663786719 0.67212570 0.81908712 0.803353309 -41 0.107711792 0.39496422 0.157332692 0.34387862 0.81230429 0.606811568 -42 0.264343262 0.35475087 0.116596107 0.21385085 0.33521056 0.911987601 -43 0.717773438 0.92168236 0.860613002 0.26366805 0.50917660 0.285974402 -44 0.298767090 0.97046804 0.715277340 0.40017026 0.53598483 0.602097132 -45 0.838989258 0.43197370 0.872493969 0.93329615 0.55644537 0.399561767 -46 0.547485352 0.87380695 0.425328480 0.84611454 0.91989352 0.449281177 -47 0.951660156 0.55768442 0.701688468 0.69816831 0.07641118 0.280890167 -48 0.438110352 0.67539835 0.596034631 0.31697085 0.97244354 0.052248614 -49 0.360046387 0.84610510 0.208412720 0.62072056 0.59479764 0.122431251 -50 0.055969238 0.76994514 0.313554974 0.71819807 0.62459766 0.170687066 -51 0.409973145 0.02636161 0.004133753 0.43609714 0.56356174 0.735989964 -52 0.835083008 0.06974322 0.933788894 0.25459031 0.68429414 0.836456893 -53 0.328552246 0.95790482 0.581586711 0.96089912 0.64085773 0.649938160 -54 0.153930664 0.10510141 0.862072270 0.82662339 0.84238057 0.104127737 -55 0.360107422 0.57847071 0.425726887 0.64190236 0.66252058 0.930490654 -56 0.169525146 0.91843414 0.262370519 0.47529812 0.62708726 0.655481011 -57 0.915771484 0.70346546 0.545828892 0.59429612 0.21518204 0.868149194 -58 0.194366455 0.85970068 0.682605598 0.28758652 0.08545504 0.044229804 -59 0.262573242 0.02926101 0.503761623 0.72549339 0.82246938 0.239758181 -60 0.890747070 0.46807122 0.086424077 0.19262842 0.35845780 0.013044060 -61 0.934326172 0.94439077 0.478865772 0.21141539 0.85893385 0.039905848 -62 0.015239716 0.02890442 0.531706404 0.91962052 0.96377103 0.279689568 -63 0.363159180 0.98267412 0.382022258 0.09035326 0.53721446 0.278258128 -64 0.533203125 0.09129518 0.864049435 0.21085775 0.74247024 0.520784463 -65 0.812866211 0.92549849 0.326250156 0.03063606 0.37242442 0.681011943 -66 0.821655273 0.93953514 0.730109224 0.56800164 0.36850434 0.135115089 -67 0.495239258 0.18656993 0.703959208 0.91950956 0.37737182 0.331145230 -68 0.026271820 0.28924441 0.370986423 0.46839579 0.26069062 0.496386772 -69 0.961181641 0.07934558 0.370282067 0.01009577 0.91984033 0.250117553 -70 0.867187500 0.62807846 0.297433884 0.42768580 0.67836226 0.055045441 -71 0.634155273 0.45481491 0.366012510 0.46006086 0.62342353 0.553148303 -72 0.529907227 0.22573161 0.255918004 0.81299654 0.48340851 0.388373295 -73 0.969482422 0.06762362 0.233285627 0.28913314 0.40695817 0.379425337 -74 0.322631836 0.16369033 0.696140964 0.23542822 0.44133423 0.353194184 -75 0.980957031 0.88483143 0.904902402 0.40588630 0.43244408 0.104077954 -76 0.381713867 0.33405781 0.008811487 0.85152244 0.97412609 0.427583363 -77 0.352050781 0.81973124 0.882616673 0.97839957 0.91734389 0.705771805 -78 0.236816406 0.13472927 0.039259837 0.18197673 0.83403650 0.871165875 -79 0.216461182 0.39390779 0.689487964 0.52816572 0.18237391 0.328639985 -80 0.579467773 0.16152561 0.799306294 0.01943226 0.19664442 0.494486603 -81 0.213165283 0.49794507 0.903515683 0.82634666 0.95104984 0.512989034 -82 0.369934082 0.48608422 0.740175959 0.22198786 0.88631389 0.958679024 -83 0.023796082 0.34724808 0.996114468 0.41663422 0.13658224 0.809843882 -84 0.390930176 0.94919586 0.265328477 0.42259452 0.18362993 0.018595368 -85 0.171417236 0.26409721 0.171493893 0.43668409 0.29935710 0.788430851 -86 0.980102539 0.42689586 0.197483132 0.61358141 0.66990291 0.453710159 -87 0.656982422 0.36696911 0.047739081 0.27451939 0.18052140 0.054421855 -88 0.488464355 0.91196012 0.845107406 0.83929407 0.90409508 0.544446660 -89 0.314025879 0.50865173 0.984073751 0.74795267 0.57416734 0.370512281 -90 0.805297852 0.37908387 0.390562004 0.36959290 0.51052391 0.633604296 -91 0.471252441 0.43228960 0.225722159 0.80595341 0.16973734 0.474416345 -92 0.539428711 0.33449984 0.007872077 0.28196563 0.04201044 0.666856505 -93 0.825561523 0.27042723 0.774102103 0.16982144 0.04986308 0.830708595 -94 0.005760193 0.06863922 0.413105001 0.80787951 0.81871474 0.565592853 -95 0.623413086 0.09422225 0.729800716 0.35120569 0.16269988 0.935669079 -96 0.963989258 0.96828461 0.043478839 0.90069377 0.50886120 0.842695923 -97 0.421020508 0.16918373 0.196973316 0.52296367 0.20205632 0.007268806 -98 0.313354492 0.58946466 0.881128855 0.73021358 0.38516078 0.459060744 -99 0.963256836 0.91588259 0.873051692 0.97309719 0.75135814 0.770613592 -100 0.823852539 0.12452227 0.845681194 0.08775397 0.15969781 0.854058568 - -> -> write.xport(w$test,z=w$z,file="a.xpt") #6.a -> lookup.xport("a.xpt") #6.b - -SAS xport file --------------- -Filename: `a.xpt' - -Variables in data set `W.TEST': - dataset name type format flength fdigits iformat iflength ifdigits - W.TEST RACE character RACE 0 0 0 0 - W.TEST AGE numeric 0 0 0 0 - W.TEST D1 numeric MMDDYY 10 0 0 0 - W.TEST DT1 numeric DATETIME 0 0 0 0 - W.TEST T1 character TIME 0 0 0 0 - label nobs - 2 - Age at Beginning of Study 2 - 2 - 2 - 2 - -Variables in data set `Z': - dataset name type format flength fdigits iformat iflength ifdigits label - Z X3 numeric 0 0 0 0 - Z X4 numeric 0 0 0 0 - Z X5 numeric 0 0 0 0 - Z X6 numeric 0 0 0 0 - Z X7 numeric 0 0 0 0 - Z X8 numeric 0 0 0 0 - nobs - 100 - 100 - 100 - 100 - 100 - 100 - -> (tmp <- read.xport("a.xpt")) #6.c -$w.test - RACE AGE D1 DT1 T1 -1 blue 30 2002-03-03 (03 Mar 2002 04:31:02) 11:13:45 -2 31 2002-06-03 (03 Jun 2002 04:42:07) 11:14:13 - -$z - X3 X4 X5 X6 X7 X8 -1 0.554809570 0.91026592 0.199472918 0.77819594 0.76480773 0.907832049 -2 0.628906250 0.59507513 0.149382079 0.19969965 0.45795571 0.571611564 -3 0.560180664 0.20155370 0.871071571 0.89158189 0.81783537 0.069788893 -4 0.930175781 0.67952251 0.064709651 0.23829160 0.67566234 0.861676832 -5 0.427307129 0.53496075 0.903572354 0.77109401 0.74774458 0.131040108 -6 0.185058594 0.51981020 0.793640781 0.78736015 0.76898101 0.891668539 -7 0.173126221 0.41728735 0.038577245 0.50426505 0.49957831 0.613314660 -8 0.896362305 0.80392504 0.701412492 0.70635040 0.14863697 0.406764784 -9 0.533935547 0.29961348 0.528317338 0.99510797 0.21445599 0.373646303 -10 0.360412598 0.59865904 0.724511519 0.21542188 0.31943661 0.148101144 -11 0.567138672 0.03009592 0.068136962 0.13866363 0.81119381 0.337979215 -12 0.840698242 0.13869596 0.309818228 0.52551615 0.80671759 0.844569556 -13 0.262084961 0.21521139 0.075481503 0.13430464 0.56954970 0.443899054 -14 0.685424805 0.81032562 0.975597342 0.70753509 0.12778332 0.317631773 -15 0.752197266 0.57752514 0.195447854 0.71567068 0.72801126 0.563829176 -16 0.993896484 0.09662127 0.364689407 0.54199747 0.81191797 0.959635779 -17 0.264099121 0.11393309 0.812418848 0.28320176 0.46030928 0.530359364 -18 0.630615234 0.80165958 0.918073907 0.19114500 0.04715550 0.297804402 -19 0.630126953 0.83771992 0.658738920 0.20772481 0.11557381 0.936940561 -20 0.671508789 0.62512779 0.713715522 0.27031328 0.44528787 0.076310964 -21 0.451599121 0.97465801 0.088417932 0.56017806 0.08855998 0.131952559 -22 0.531616211 0.13582230 0.125990903 0.68861063 0.05864216 0.657296563 -23 0.745361328 0.52416706 0.138287167 0.93139657 0.93634337 0.279499571 -24 0.860229492 0.23535800 0.067773213 0.55205996 0.86140652 0.580399050 -25 0.885864258 0.89300871 0.154446173 0.05930633 0.47589580 0.489967297 -26 0.133148193 0.61039686 0.236988616 0.43535325 0.67330840 0.042648594 -27 0.106369019 0.47435546 0.894045589 0.71908408 0.91220874 0.777561118 -28 0.321899414 0.82515574 0.345769540 0.27898190 0.37587550 0.221321993 -29 0.584350586 0.45017719 0.256426542 0.55128526 0.99790806 0.116743046 -30 0.782714844 0.88925648 0.672125481 0.44156701 0.77192310 0.389772559 -31 0.255737305 0.76892853 0.691356288 0.24103043 0.30677701 0.010585836 -32 0.268127441 0.49482346 0.566317322 0.80006739 0.53679024 0.787674241 -33 0.132080078 0.55090714 0.066530403 0.35998585 0.50696324 0.892336901 -34 0.209716797 0.87050629 0.265810063 0.34237937 0.99317888 0.516304360 -35 0.731567383 0.80692101 0.868052749 0.41159689 0.81571351 0.670747127 -36 0.974731445 0.05395064 0.043045310 0.30307713 0.82485616 0.613199657 -37 0.060417175 0.93399811 0.892186217 0.54169906 0.80318660 0.918251223 -38 0.053512573 0.45821238 0.997252798 0.18699222 0.74571744 0.118700152 -39 0.274291992 0.15809727 0.456446022 0.81648360 0.93111440 0.607009959 -40 0.902587891 0.92125559 0.663786719 0.67212570 0.81908712 0.803353309 -41 0.107711792 0.39496422 0.157332692 0.34387862 0.81230429 0.606811568 -42 0.264343262 0.35475087 0.116596107 0.21385085 0.33521056 0.911987601 -43 0.717773438 0.92168236 0.860613002 0.26366805 0.50917660 0.285974402 -44 0.298767090 0.97046804 0.715277340 0.40017026 0.53598483 0.602097132 -45 0.838989258 0.43197370 0.872493969 0.93329615 0.55644537 0.399561767 -46 0.547485352 0.87380695 0.425328480 0.84611454 0.91989352 0.449281177 -47 0.951660156 0.55768442 0.701688468 0.69816831 0.07641118 0.280890167 -48 0.438110352 0.67539835 0.596034631 0.31697085 0.97244354 0.052248614 -49 0.360046387 0.84610510 0.208412720 0.62072056 0.59479764 0.122431251 -50 0.055969238 0.76994514 0.313554974 0.71819807 0.62459766 0.170687066 -51 0.409973145 0.02636161 0.004133753 0.43609714 0.56356174 0.735989964 -52 0.835083008 0.06974322 0.933788894 0.25459031 0.68429414 0.836456893 -53 0.328552246 0.95790482 0.581586711 0.96089912 0.64085773 0.649938160 -54 0.153930664 0.10510141 0.862072270 0.82662339 0.84238057 0.104127737 -55 0.360107422 0.57847071 0.425726887 0.64190236 0.66252058 0.930490654 -56 0.169525146 0.91843414 0.262370519 0.47529812 0.62708726 0.655481011 -57 0.915771484 0.70346546 0.545828892 0.59429612 0.21518204 0.868149194 -58 0.194366455 0.85970068 0.682605598 0.28758652 0.08545504 0.044229804 -59 0.262573242 0.02926101 0.503761623 0.72549339 0.82246938 0.239758181 -60 0.890747070 0.46807122 0.086424077 0.19262842 0.35845780 0.013044060 -61 0.934326172 0.94439077 0.478865772 0.21141539 0.85893385 0.039905848 -62 0.015239716 0.02890442 0.531706404 0.91962052 0.96377103 0.279689568 -63 0.363159180 0.98267412 0.382022258 0.09035326 0.53721446 0.278258128 -64 0.533203125 0.09129518 0.864049435 0.21085775 0.74247024 0.520784463 -65 0.812866211 0.92549849 0.326250156 0.03063606 0.37242442 0.681011943 -66 0.821655273 0.93953514 0.730109224 0.56800164 0.36850434 0.135115089 -67 0.495239258 0.18656993 0.703959208 0.91950956 0.37737182 0.331145230 -68 0.026271820 0.28924441 0.370986423 0.46839579 0.26069062 0.496386772 -69 0.961181641 0.07934558 0.370282067 0.01009577 0.91984033 0.250117553 -70 0.867187500 0.62807846 0.297433884 0.42768580 0.67836226 0.055045441 -71 0.634155273 0.45481491 0.366012510 0.46006086 0.62342353 0.553148303 -72 0.529907227 0.22573161 0.255918004 0.81299654 0.48340851 0.388373295 -73 0.969482422 0.06762362 0.233285627 0.28913314 0.40695817 0.379425337 -74 0.322631836 0.16369033 0.696140964 0.23542822 0.44133423 0.353194184 -75 0.980957031 0.88483143 0.904902402 0.40588630 0.43244408 0.104077954 -76 0.381713867 0.33405781 0.008811487 0.85152244 0.97412609 0.427583363 -77 0.352050781 0.81973124 0.882616673 0.97839957 0.91734389 0.705771805 -78 0.236816406 0.13472927 0.039259837 0.18197673 0.83403650 0.871165875 -79 0.216461182 0.39390779 0.689487964 0.52816572 0.18237391 0.328639985 -80 0.579467773 0.16152561 0.799306294 0.01943226 0.19664442 0.494486603 -81 0.213165283 0.49794507 0.903515683 0.82634666 0.95104984 0.512989034 -82 0.369934082 0.48608422 0.740175959 0.22198786 0.88631389 0.958679024 -83 0.023796082 0.34724808 0.996114468 0.41663422 0.13658224 0.809843882 -84 0.390930176 0.94919586 0.265328477 0.42259452 0.18362993 0.018595368 -85 0.171417236 0.26409721 0.171493893 0.43668409 0.29935710 0.788430851 -86 0.980102539 0.42689586 0.197483132 0.61358141 0.66990291 0.453710159 -87 0.656982422 0.36696911 0.047739081 0.27451939 0.18052140 0.054421855 -88 0.488464355 0.91196012 0.845107406 0.83929407 0.90409508 0.544446660 -89 0.314025879 0.50865173 0.984073751 0.74795267 0.57416734 0.370512281 -90 0.805297852 0.37908387 0.390562004 0.36959290 0.51052391 0.633604296 -91 0.471252441 0.43228960 0.225722159 0.80595341 0.16973734 0.474416345 -92 0.539428711 0.33449984 0.007872077 0.28196563 0.04201044 0.666856505 -93 0.825561523 0.27042723 0.774102103 0.16982144 0.04986308 0.830708595 -94 0.005760193 0.06863922 0.413105001 0.80787951 0.81871474 0.565592853 -95 0.623413086 0.09422225 0.729800716 0.35120569 0.16269988 0.935669079 -96 0.963989258 0.96828461 0.043478839 0.90069377 0.50886120 0.842695923 -97 0.421020508 0.16918373 0.196973316 0.52296367 0.20205632 0.007268806 -98 0.313354492 0.58946466 0.881128855 0.73021358 0.38516078 0.459060744 -99 0.963256836 0.91588259 0.873051692 0.97309719 0.75135814 0.770613592 -100 0.823852539 0.12452227 0.845681194 0.08775397 0.15969781 0.854058568 - -> -> write.xport(list=w,file="a.xpt") #7.a -> lookup.xport("a.xpt") #7.b - -SAS xport file --------------- -Filename: `a.xpt' - -Variables in data set `TEST': - dataset name type format flength fdigits iformat iflength ifdigits - TEST RACE numeric RACE 0 0 0 0 - TEST AGE numeric 0 0 0 0 - TEST D1 numeric MMDDYY 10 0 0 0 - TEST DT1 numeric DATETIME 0 0 0 0 - TEST T1 character TIME 0 0 0 0 - label nobs - 2 - Age at Beginning of Study 2 - 2 - 2 - 2 - -Variables in data set `Z': - dataset name type format flength fdigits iformat iflength ifdigits label - Z X3 numeric 0 0 0 0 - Z X4 numeric 0 0 0 0 - Z X5 numeric 0 0 0 0 - Z X6 numeric 0 0 0 0 - Z X7 numeric 0 0 0 0 - Z X8 numeric 0 0 0 0 - nobs - 100 - 100 - 100 - 100 - 100 - 100 - -Variables in data set `FORMATS': - dataset name type format flength fdigits iformat iflength ifdigits - FORMATS FMTNAME character 0 0 0 0 - FORMATS START character 0 0 0 0 - FORMATS END character 0 0 0 0 - FORMATS LABEL character 0 0 0 0 - FORMATS MIN numeric 0 0 0 0 - FORMATS MAX numeric 0 0 0 0 - FORMATS DEFAULT numeric 0 0 0 0 - FORMATS LENGTH numeric 0 0 0 0 - FORMATS FUZZ numeric 0 0 0 0 - FORMATS PREFIX character 0 0 0 0 - FORMATS MULT numeric 0 0 0 0 - FORMATS FILL character 0 0 0 0 - FORMATS NOEDIT numeric 0 0 0 0 - FORMATS TYPE character 0 0 0 0 - FORMATS SEXCL character 0 0 0 0 - FORMATS EEXCL character 0 0 0 0 - FORMATS HLO character 0 0 0 0 - FORMATS DECSEP character 0 0 0 0 - FORMATS DIG3SEP character 0 0 0 0 - FORMATS DATATYPE character 0 0 0 0 - FORMATS LANGUAGE character 0 0 0 0 - label nobs - 3 - 3 - 3 - 3 - 3 - 3 - 3 - 3 - 3 - 3 - 3 - 3 - 3 - 3 - 3 - 3 - 3 - 3 - 3 - 3 - 3 - -> (tmp <- read.xport("a.xpt")) #7.c -$test - RACE AGE D1 DT1 T1 -1 blue 30 2002-03-03 (03 Mar 2002 04:31:02) 11:13:45 -2 <NA> 31 2002-06-03 (03 Jun 2002 04:42:07) 11:14:13 - -$z - X3 X4 X5 X6 X7 X8 -1 0.554809570 0.91026592 0.199472918 0.77819594 0.76480773 0.907832049 -2 0.628906250 0.59507513 0.149382079 0.19969965 0.45795571 0.571611564 -3 0.560180664 0.20155370 0.871071571 0.89158189 0.81783537 0.069788893 -4 0.930175781 0.67952251 0.064709651 0.23829160 0.67566234 0.861676832 -5 0.427307129 0.53496075 0.903572354 0.77109401 0.74774458 0.131040108 -6 0.185058594 0.51981020 0.793640781 0.78736015 0.76898101 0.891668539 -7 0.173126221 0.41728735 0.038577245 0.50426505 0.49957831 0.613314660 -8 0.896362305 0.80392504 0.701412492 0.70635040 0.14863697 0.406764784 -9 0.533935547 0.29961348 0.528317338 0.99510797 0.21445599 0.373646303 -10 0.360412598 0.59865904 0.724511519 0.21542188 0.31943661 0.148101144 -11 0.567138672 0.03009592 0.068136962 0.13866363 0.81119381 0.337979215 -12 0.840698242 0.13869596 0.309818228 0.52551615 0.80671759 0.844569556 -13 0.262084961 0.21521139 0.075481503 0.13430464 0.56954970 0.443899054 -14 0.685424805 0.81032562 0.975597342 0.70753509 0.12778332 0.317631773 -15 0.752197266 0.57752514 0.195447854 0.71567068 0.72801126 0.563829176 -16 0.993896484 0.09662127 0.364689407 0.54199747 0.81191797 0.959635779 -17 0.264099121 0.11393309 0.812418848 0.28320176 0.46030928 0.530359364 -18 0.630615234 0.80165958 0.918073907 0.19114500 0.04715550 0.297804402 -19 0.630126953 0.83771992 0.658738920 0.20772481 0.11557381 0.936940561 -20 0.671508789 0.62512779 0.713715522 0.27031328 0.44528787 0.076310964 -21 0.451599121 0.97465801 0.088417932 0.56017806 0.08855998 0.131952559 -22 0.531616211 0.13582230 0.125990903 0.68861063 0.05864216 0.657296563 -23 0.745361328 0.52416706 0.138287167 0.93139657 0.93634337 0.279499571 -24 0.860229492 0.23535800 0.067773213 0.55205996 0.86140652 0.580399050 -25 0.885864258 0.89300871 0.154446173 0.05930633 0.47589580 0.489967297 -26 0.133148193 0.61039686 0.236988616 0.43535325 0.67330840 0.042648594 -27 0.106369019 0.47435546 0.894045589 0.71908408 0.91220874 0.777561118 -28 0.321899414 0.82515574 0.345769540 0.27898190 0.37587550 0.221321993 -29 0.584350586 0.45017719 0.256426542 0.55128526 0.99790806 0.116743046 -30 0.782714844 0.88925648 0.672125481 0.44156701 0.77192310 0.389772559 -31 0.255737305 0.76892853 0.691356288 0.24103043 0.30677701 0.010585836 -32 0.268127441 0.49482346 0.566317322 0.80006739 0.53679024 0.787674241 -33 0.132080078 0.55090714 0.066530403 0.35998585 0.50696324 0.892336901 -34 0.209716797 0.87050629 0.265810063 0.34237937 0.99317888 0.516304360 -35 0.731567383 0.80692101 0.868052749 0.41159689 0.81571351 0.670747127 -36 0.974731445 0.05395064 0.043045310 0.30307713 0.82485616 0.613199657 -37 0.060417175 0.93399811 0.892186217 0.54169906 0.80318660 0.918251223 -38 0.053512573 0.45821238 0.997252798 0.18699222 0.74571744 0.118700152 -39 0.274291992 0.15809727 0.456446022 0.81648360 0.93111440 0.607009959 -40 0.902587891 0.92125559 0.663786719 0.67212570 0.81908712 0.803353309 -41 0.107711792 0.39496422 0.157332692 0.34387862 0.81230429 0.606811568 -42 0.264343262 0.35475087 0.116596107 0.21385085 0.33521056 0.911987601 -43 0.717773438 0.92168236 0.860613002 0.26366805 0.50917660 0.285974402 -44 0.298767090 0.97046804 0.715277340 0.40017026 0.53598483 0.602097132 -45 0.838989258 0.43197370 0.872493969 0.93329615 0.55644537 0.399561767 -46 0.547485352 0.87380695 0.425328480 0.84611454 0.91989352 0.449281177 -47 0.951660156 0.55768442 0.701688468 0.69816831 0.07641118 0.280890167 -48 0.438110352 0.67539835 0.596034631 0.31697085 0.97244354 0.052248614 -49 0.360046387 0.84610510 0.208412720 0.62072056 0.59479764 0.122431251 -50 0.055969238 0.76994514 0.313554974 0.71819807 0.62459766 0.170687066 -51 0.409973145 0.02636161 0.004133753 0.43609714 0.56356174 0.735989964 -52 0.835083008 0.06974322 0.933788894 0.25459031 0.68429414 0.836456893 -53 0.328552246 0.95790482 0.581586711 0.96089912 0.64085773 0.649938160 -54 0.153930664 0.10510141 0.862072270 0.82662339 0.84238057 0.104127737 -55 0.360107422 0.57847071 0.425726887 0.64190236 0.66252058 0.930490654 -56 0.169525146 0.91843414 0.262370519 0.47529812 0.62708726 0.655481011 -57 0.915771484 0.70346546 0.545828892 0.59429612 0.21518204 0.868149194 -58 0.194366455 0.85970068 0.682605598 0.28758652 0.08545504 0.044229804 -59 0.262573242 0.02926101 0.503761623 0.72549339 0.82246938 0.239758181 -60 0.890747070 0.46807122 0.086424077 0.19262842 0.35845780 0.013044060 -61 0.934326172 0.94439077 0.478865772 0.21141539 0.85893385 0.039905848 -62 0.015239716 0.02890442 0.531706404 0.91962052 0.96377103 0.279689568 -63 0.363159180 0.98267412 0.382022258 0.09035326 0.53721446 0.278258128 -64 0.533203125 0.09129518 0.864049435 0.21085775 0.74247024 0.520784463 -65 0.812866211 0.92549849 0.326250156 0.03063606 0.37242442 0.681011943 -66 0.821655273 0.93953514 0.730109224 0.56800164 0.36850434 0.135115089 -67 0.495239258 0.18656993 0.703959208 0.91950956 0.37737182 0.331145230 -68 0.026271820 0.28924441 0.370986423 0.46839579 0.26069062 0.496386772 -69 0.961181641 0.07934558 0.370282067 0.01009577 0.91984033 0.250117553 -70 0.867187500 0.62807846 0.297433884 0.42768580 0.67836226 0.055045441 -71 0.634155273 0.45481491 0.366012510 0.46006086 0.62342353 0.553148303 -72 0.529907227 0.22573161 0.255918004 0.81299654 0.48340851 0.388373295 -73 0.969482422 0.06762362 0.233285627 0.28913314 0.40695817 0.379425337 -74 0.322631836 0.16369033 0.696140964 0.23542822 0.44133423 0.353194184 -75 0.980957031 0.88483143 0.904902402 0.40588630 0.43244408 0.104077954 -76 0.381713867 0.33405781 0.008811487 0.85152244 0.97412609 0.427583363 -77 0.352050781 0.81973124 0.882616673 0.97839957 0.91734389 0.705771805 -78 0.236816406 0.13472927 0.039259837 0.18197673 0.83403650 0.871165875 -79 0.216461182 0.39390779 0.689487964 0.52816572 0.18237391 0.328639985 -80 0.579467773 0.16152561 0.799306294 0.01943226 0.19664442 0.494486603 -81 0.213165283 0.49794507 0.903515683 0.82634666 0.95104984 0.512989034 -82 0.369934082 0.48608422 0.740175959 0.22198786 0.88631389 0.958679024 -83 0.023796082 0.34724808 0.996114468 0.41663422 0.13658224 0.809843882 -84 0.390930176 0.94919586 0.265328477 0.42259452 0.18362993 0.018595368 -85 0.171417236 0.26409721 0.171493893 0.43668409 0.29935710 0.788430851 -86 0.980102539 0.42689586 0.197483132 0.61358141 0.66990291 0.453710159 -87 0.656982422 0.36696911 0.047739081 0.27451939 0.18052140 0.054421855 -88 0.488464355 0.91196012 0.845107406 0.83929407 0.90409508 0.544446660 -89 0.314025879 0.50865173 0.984073751 0.74795267 0.57416734 0.370512281 -90 0.805297852 0.37908387 0.390562004 0.36959290 0.51052391 0.633604296 -91 0.471252441 0.43228960 0.225722159 0.80595341 0.16973734 0.474416345 -92 0.539428711 0.33449984 0.007872077 0.28196563 0.04201044 0.666856505 -93 0.825561523 0.27042723 0.774102103 0.16982144 0.04986308 0.830708595 -94 0.005760193 0.06863922 0.413105001 0.80787951 0.81871474 0.565592853 -95 0.623413086 0.09422225 0.729800716 0.35120569 0.16269988 0.935669079 -96 0.963989258 0.96828461 0.043478839 0.90069377 0.50886120 0.842695923 -97 0.421020508 0.16918373 0.196973316 0.52296367 0.20205632 0.007268806 -98 0.313354492 0.58946466 0.881128855 0.73021358 0.38516078 0.459060744 -99 0.963256836 0.91588259 0.873051692 0.97309719 0.75135814 0.770613592 -100 0.823852539 0.12452227 0.845681194 0.08775397 0.15969781 0.854058568 - -> -> names(w) <- NULL -> write.xport(w[[1]],w[[2]],file="a.xpt") #8.a -Warning message: -In write.xport(w[[1]], w[[2]], file = "a.xpt") : - Data frame names modified to obey SAS rules -> lookup.xport("a.xpt") #8.b - -SAS xport file --------------- -Filename: `a.xpt' - -Variables in data set `W..1..': - dataset name type format flength fdigits iformat iflength ifdigits - W..1.. RACE character RACE 0 0 0 0 - W..1.. AGE numeric 0 0 0 0 - W..1.. D1 numeric MMDDYY 10 0 0 0 - W..1.. DT1 numeric DATETIME 0 0 0 0 - W..1.. T1 character TIME 0 0 0 0 - label nobs - 2 - Age at Beginning of Study 2 - 2 - 2 - 2 - -Variables in data set `W..2..': - dataset name type format flength fdigits iformat iflength ifdigits label - W..2.. X3 numeric 0 0 0 0 - W..2.. X4 numeric 0 0 0 0 - W..2.. X5 numeric 0 0 0 0 - W..2.. X6 numeric 0 0 0 0 - W..2.. X7 numeric 0 0 0 0 - W..2.. X8 numeric 0 0 0 0 - nobs - 100 - 100 - 100 - 100 - 100 - 100 - -> (tmp <- read.xport("a.xpt")) #8.c -$w..1.. - RACE AGE D1 DT1 T1 -1 blue 30 2002-03-03 (03 Mar 2002 04:31:02) 11:13:45 -2 31 2002-06-03 (03 Jun 2002 04:42:07) 11:14:13 - -$w..2.. - X3 X4 X5 X6 X7 X8 -1 0.554809570 0.91026592 0.199472918 0.77819594 0.76480773 0.907832049 -2 0.628906250 0.59507513 0.149382079 0.19969965 0.45795571 0.571611564 -3 0.560180664 0.20155370 0.871071571 0.89158189 0.81783537 0.069788893 -4 0.930175781 0.67952251 0.064709651 0.23829160 0.67566234 0.861676832 -5 0.427307129 0.53496075 0.903572354 0.77109401 0.74774458 0.131040108 -6 0.185058594 0.51981020 0.793640781 0.78736015 0.76898101 0.891668539 -7 0.173126221 0.41728735 0.038577245 0.50426505 0.49957831 0.613314660 -8 0.896362305 0.80392504 0.701412492 0.70635040 0.14863697 0.406764784 -9 0.533935547 0.29961348 0.528317338 0.99510797 0.21445599 0.373646303 -10 0.360412598 0.59865904 0.724511519 0.21542188 0.31943661 0.148101144 -11 0.567138672 0.03009592 0.068136962 0.13866363 0.81119381 0.337979215 -12 0.840698242 0.13869596 0.309818228 0.52551615 0.80671759 0.844569556 -13 0.262084961 0.21521139 0.075481503 0.13430464 0.56954970 0.443899054 -14 0.685424805 0.81032562 0.975597342 0.70753509 0.12778332 0.317631773 -15 0.752197266 0.57752514 0.195447854 0.71567068 0.72801126 0.563829176 -16 0.993896484 0.09662127 0.364689407 0.54199747 0.81191797 0.959635779 -17 0.264099121 0.11393309 0.812418848 0.28320176 0.46030928 0.530359364 -18 0.630615234 0.80165958 0.918073907 0.19114500 0.04715550 0.297804402 -19 0.630126953 0.83771992 0.658738920 0.20772481 0.11557381 0.936940561 -20 0.671508789 0.62512779 0.713715522 0.27031328 0.44528787 0.076310964 -21 0.451599121 0.97465801 0.088417932 0.56017806 0.08855998 0.131952559 -22 0.531616211 0.13582230 0.125990903 0.68861063 0.05864216 0.657296563 -23 0.745361328 0.52416706 0.138287167 0.93139657 0.93634337 0.279499571 -24 0.860229492 0.23535800 0.067773213 0.55205996 0.86140652 0.580399050 -25 0.885864258 0.89300871 0.154446173 0.05930633 0.47589580 0.489967297 -26 0.133148193 0.61039686 0.236988616 0.43535325 0.67330840 0.042648594 -27 0.106369019 0.47435546 0.894045589 0.71908408 0.91220874 0.777561118 -28 0.321899414 0.82515574 0.345769540 0.27898190 0.37587550 0.221321993 -29 0.584350586 0.45017719 0.256426542 0.55128526 0.99790806 0.116743046 -30 0.782714844 0.88925648 0.672125481 0.44156701 0.77192310 0.389772559 -31 0.255737305 0.76892853 0.691356288 0.24103043 0.30677701 0.010585836 -32 0.268127441 0.49482346 0.566317322 0.80006739 0.53679024 0.787674241 -33 0.132080078 0.55090714 0.066530403 0.35998585 0.50696324 0.892336901 -34 0.209716797 0.87050629 0.265810063 0.34237937 0.99317888 0.516304360 -35 0.731567383 0.80692101 0.868052749 0.41159689 0.81571351 0.670747127 -36 0.974731445 0.05395064 0.043045310 0.30307713 0.82485616 0.613199657 -37 0.060417175 0.93399811 0.892186217 0.54169906 0.80318660 0.918251223 -38 0.053512573 0.45821238 0.997252798 0.18699222 0.74571744 0.118700152 -39 0.274291992 0.15809727 0.456446022 0.81648360 0.93111440 0.607009959 -40 0.902587891 0.92125559 0.663786719 0.67212570 0.81908712 0.803353309 -41 0.107711792 0.39496422 0.157332692 0.34387862 0.81230429 0.606811568 -42 0.264343262 0.35475087 0.116596107 0.21385085 0.33521056 0.911987601 -43 0.717773438 0.92168236 0.860613002 0.26366805 0.50917660 0.285974402 -44 0.298767090 0.97046804 0.715277340 0.40017026 0.53598483 0.602097132 -45 0.838989258 0.43197370 0.872493969 0.93329615 0.55644537 0.399561767 -46 0.547485352 0.87380695 0.425328480 0.84611454 0.91989352 0.449281177 -47 0.951660156 0.55768442 0.701688468 0.69816831 0.07641118 0.280890167 -48 0.438110352 0.67539835 0.596034631 0.31697085 0.97244354 0.052248614 -49 0.360046387 0.84610510 0.208412720 0.62072056 0.59479764 0.122431251 -50 0.055969238 0.76994514 0.313554974 0.71819807 0.62459766 0.170687066 -51 0.409973145 0.02636161 0.004133753 0.43609714 0.56356174 0.735989964 -52 0.835083008 0.06974322 0.933788894 0.25459031 0.68429414 0.836456893 -53 0.328552246 0.95790482 0.581586711 0.96089912 0.64085773 0.649938160 -54 0.153930664 0.10510141 0.862072270 0.82662339 0.84238057 0.104127737 -55 0.360107422 0.57847071 0.425726887 0.64190236 0.66252058 0.930490654 -56 0.169525146 0.91843414 0.262370519 0.47529812 0.62708726 0.655481011 -57 0.915771484 0.70346546 0.545828892 0.59429612 0.21518204 0.868149194 -58 0.194366455 0.85970068 0.682605598 0.28758652 0.08545504 0.044229804 -59 0.262573242 0.02926101 0.503761623 0.72549339 0.82246938 0.239758181 -60 0.890747070 0.46807122 0.086424077 0.19262842 0.35845780 0.013044060 -61 0.934326172 0.94439077 0.478865772 0.21141539 0.85893385 0.039905848 -62 0.015239716 0.02890442 0.531706404 0.91962052 0.96377103 0.279689568 -63 0.363159180 0.98267412 0.382022258 0.09035326 0.53721446 0.278258128 -64 0.533203125 0.09129518 0.864049435 0.21085775 0.74247024 0.520784463 -65 0.812866211 0.92549849 0.326250156 0.03063606 0.37242442 0.681011943 -66 0.821655273 0.93953514 0.730109224 0.56800164 0.36850434 0.135115089 -67 0.495239258 0.18656993 0.703959208 0.91950956 0.37737182 0.331145230 -68 0.026271820 0.28924441 0.370986423 0.46839579 0.26069062 0.496386772 -69 0.961181641 0.07934558 0.370282067 0.01009577 0.91984033 0.250117553 -70 0.867187500 0.62807846 0.297433884 0.42768580 0.67836226 0.055045441 -71 0.634155273 0.45481491 0.366012510 0.46006086 0.62342353 0.553148303 -72 0.529907227 0.22573161 0.255918004 0.81299654 0.48340851 0.388373295 -73 0.969482422 0.06762362 0.233285627 0.28913314 0.40695817 0.379425337 -74 0.322631836 0.16369033 0.696140964 0.23542822 0.44133423 0.353194184 -75 0.980957031 0.88483143 0.904902402 0.40588630 0.43244408 0.104077954 -76 0.381713867 0.33405781 0.008811487 0.85152244 0.97412609 0.427583363 -77 0.352050781 0.81973124 0.882616673 0.97839957 0.91734389 0.705771805 -78 0.236816406 0.13472927 0.039259837 0.18197673 0.83403650 0.871165875 -79 0.216461182 0.39390779 0.689487964 0.52816572 0.18237391 0.328639985 -80 0.579467773 0.16152561 0.799306294 0.01943226 0.19664442 0.494486603 -81 0.213165283 0.49794507 0.903515683 0.82634666 0.95104984 0.512989034 -82 0.369934082 0.48608422 0.740175959 0.22198786 0.88631389 0.958679024 -83 0.023796082 0.34724808 0.996114468 0.41663422 0.13658224 0.809843882 -84 0.390930176 0.94919586 0.265328477 0.42259452 0.18362993 0.018595368 -85 0.171417236 0.26409721 0.171493893 0.43668409 0.29935710 0.788430851 -86 0.980102539 0.42689586 0.197483132 0.61358141 0.66990291 0.453710159 -87 0.656982422 0.36696911 0.047739081 0.27451939 0.18052140 0.054421855 -88 0.488464355 0.91196012 0.845107406 0.83929407 0.90409508 0.544446660 -89 0.314025879 0.50865173 0.984073751 0.74795267 0.57416734 0.370512281 -90 0.805297852 0.37908387 0.390562004 0.36959290 0.51052391 0.633604296 -91 0.471252441 0.43228960 0.225722159 0.80595341 0.16973734 0.474416345 -92 0.539428711 0.33449984 0.007872077 0.28196563 0.04201044 0.666856505 -93 0.825561523 0.27042723 0.774102103 0.16982144 0.04986308 0.830708595 -94 0.005760193 0.06863922 0.413105001 0.80787951 0.81871474 0.565592853 -95 0.623413086 0.09422225 0.729800716 0.35120569 0.16269988 0.935669079 -96 0.963989258 0.96828461 0.043478839 0.90069377 0.50886120 0.842695923 -97 0.421020508 0.16918373 0.196973316 0.52296367 0.20205632 0.007268806 -98 0.313354492 0.58946466 0.881128855 0.73021358 0.38516078 0.459060744 -99 0.963256836 0.91588259 0.873051692 0.97309719 0.75135814 0.770613592 -100 0.823852539 0.12452227 0.845681194 0.08775397 0.15969781 0.854058568 - -> -> names(w) <- NULL -> write.xport(list=w,file="a.xpt") #9.a -Warning message: -In write.xport(list = w, file = "a.xpt") : - Replacing missing or invalid dataset names -> lookup.xport("a.xpt") #9.b - -SAS xport file --------------- -Filename: `a.xpt' - -Variables in data set `DATA1': - dataset name type format flength fdigits iformat iflength ifdigits - DATA1 RACE character RACE 0 0 0 0 - DATA1 AGE numeric 0 0 0 0 - DATA1 D1 numeric MMDDYY 10 0 0 0 - DATA1 DT1 numeric DATETIME 0 0 0 0 - DATA1 T1 character TIME 0 0 0 0 - label nobs - 2 - Age at Beginning of Study 2 - 2 - 2 - 2 - -Variables in data set `DATA2': - dataset name type format flength fdigits iformat iflength ifdigits label - DATA2 X3 numeric 0 0 0 0 - DATA2 X4 numeric 0 0 0 0 - DATA2 X5 numeric 0 0 0 0 - DATA2 X6 numeric 0 0 0 0 - DATA2 X7 numeric 0 0 0 0 - DATA2 X8 numeric 0 0 0 0 - nobs - 100 - 100 - 100 - 100 - 100 - 100 - -Variables in data set `DATA3': - dataset name type format flength fdigits iformat iflength ifdigits - DATA3 FMTNAME character 0 0 0 0 - DATA3 START character 0 0 0 0 - DATA3 END character 0 0 0 0 - DATA3 LABEL character 0 0 0 0 - DATA3 MIN numeric 0 0 0 0 - DATA3 MAX numeric 0 0 0 0 - DATA3 DEFAULT numeric 0 0 0 0 - DATA3 LENGTH numeric 0 0 0 0 - DATA3 FUZZ numeric 0 0 0 0 - DATA3 PREFIX character 0 0 0 0 - DATA3 MULT numeric 0 0 0 0 - DATA3 FILL character 0 0 0 0 - DATA3 NOEDIT numeric 0 0 0 0 - DATA3 TYPE character 0 0 0 0 - DATA3 SEXCL character 0 0 0 0 - DATA3 EEXCL character 0 0 0 0 - DATA3 HLO character 0 0 0 0 - DATA3 DECSEP character 0 0 0 0 - DATA3 DIG3SEP character 0 0 0 0 - DATA3 DATATYPE character 0 0 0 0 - DATA3 LANGUAGE character 0 0 0 0 - label nobs - 3 - 3 - 3 - 3 - 3 - 3 - 3 - 3 - 3 - 3 - 3 - 3 - 3 - 3 - 3 - 3 - 3 - 3 - 3 - 3 - 3 - -> (tmp <- read.xport("a.xpt")) #9.c -$data1 - RACE AGE D1 DT1 T1 -1 <NA> 30 2002-03-03 (03 Mar 2002 04:31:02) 11:13:45 -2 <NA> 31 2002-06-03 (03 Jun 2002 04:42:07) 11:14:13 - -$data2 - X3 X4 X5 X6 X7 X8 -1 0.554809570 0.91026592 0.199472918 0.77819594 0.76480773 0.907832049 -2 0.628906250 0.59507513 0.149382079 0.19969965 0.45795571 0.571611564 -3 0.560180664 0.20155370 0.871071571 0.89158189 0.81783537 0.069788893 -4 0.930175781 0.67952251 0.064709651 0.23829160 0.67566234 0.861676832 -5 0.427307129 0.53496075 0.903572354 0.77109401 0.74774458 0.131040108 -6 0.185058594 0.51981020 0.793640781 0.78736015 0.76898101 0.891668539 -7 0.173126221 0.41728735 0.038577245 0.50426505 0.49957831 0.613314660 -8 0.896362305 0.80392504 0.701412492 0.70635040 0.14863697 0.406764784 -9 0.533935547 0.29961348 0.528317338 0.99510797 0.21445599 0.373646303 -10 0.360412598 0.59865904 0.724511519 0.21542188 0.31943661 0.148101144 -11 0.567138672 0.03009592 0.068136962 0.13866363 0.81119381 0.337979215 -12 0.840698242 0.13869596 0.309818228 0.... [truncated message content] |
From: <wa...@us...> - 2012-06-21 23:12:40
|
Revision: 1571 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1571&view=rev Author: warnes Date: 2012-06-21 23:12:34 +0000 (Thu, 21 Jun 2012) Log Message: ----------- Standardize file capitalization Added Paths: ----------- trunk/SASxport/tests/testUnnamedComponents.R Removed Paths: ------------- trunk/SASxport/tests/TestUnnamedComponents.R Deleted: trunk/SASxport/tests/TestUnnamedComponents.R =================================================================== --- trunk/SASxport/tests/TestUnnamedComponents.R 2012-06-19 19:00:31 UTC (rev 1570) +++ trunk/SASxport/tests/TestUnnamedComponents.R 2012-06-21 23:12:34 UTC (rev 1571) @@ -1,73 +0,0 @@ -library(SASxport) - - -##tests -example(read.xport) -write.xport(w$test,file="a.xpt") #1.a -lookup.xport("a.xpt") #1.b -(tmp <- read.xport("a.xpt")) #1.c - -b <- w$test -write.xport(b,file="a.xpt") #2.a -lookup.xport("a.xpt") #2.b -(tmp <- read.xport("a.xpt")) #2.c - -write.xport(test=w$test,file="a.xpt") #3.a -lookup.xport("a.xpt") #3.b -(tmp <- read.xport("a.xpt")) #3.c - -write.xport(test=w$test,z=w$z,file="a.xpt") #4.a -lookup.xport("a.xpt") #4.b -(tmp <- read.xport("a.xpt")) #4.c - -write.xport(w$test,w$z,file="a.xpt") #5.a -lookup.xport("a.xpt") #5.b -(tmp <- read.xport("a.xpt")) #5.c - -write.xport(w$test,z=w$z,file="a.xpt") #6.a -lookup.xport("a.xpt") #6.b -(tmp <- read.xport("a.xpt")) #6.c - -write.xport(list=w,file="a.xpt") #7.a -lookup.xport("a.xpt") #7.b -(tmp <- read.xport("a.xpt")) #7.c - -names(w) <- NULL -write.xport(w[[1]],w[[2]],file="a.xpt") #8.a -lookup.xport("a.xpt") #8.b -(tmp <- read.xport("a.xpt")) #8.c - -names(w) <- NULL -write.xport(list=w,file="a.xpt") #9.a -lookup.xport("a.xpt") #9.b -(tmp <- read.xport("a.xpt")) #9.c - -### Check that we catch invalid parameters -failure <- try( write.xport(5,"a.xpt") ) #10.a -SASxport:::assert( "try-error" %in% class(failure) ) #10.b -(tmp <- read.xport("a.xpt")) #10.c - -failure <- try( write.xport(list(a=5,b=6),"a.xpt") ) #11.a -SASxport:::assert( "try-error" %in% class(failure) ) #11.b -(tmp <- read.xport("a.xpt")) #10.c - -# Check with different list construction function *name* -example(read.xport) -write.xport(list=base::list(w$test,w$z),file="a.xpt") #11.a -lookup.xport("a.xpt") #11.b -(tmp <- read.xport("a.xpt")) #11.c - -# remove names -example(read.xport) -names(w) <- NULL -w[[3]] <- NULL -write.xport(list=w,file="a.xpt") #12.a -lookup.xport("a.xpt") #12.b -(tmp <- read.xport("a.xpt")) #12.c - -# remove variable names -example(read.xport) -colnames(w[[2]]) <- rep("", length=ncol(w[[2]])) -write.xport(list=w,file="a.xpt") #13.a -lookup.xport("a.xpt") #13.b -(tmp <- read.xport("a.xpt")) #13.c Copied: trunk/SASxport/tests/testUnnamedComponents.R (from rev 1570, trunk/SASxport/tests/TestUnnamedComponents.R) =================================================================== --- trunk/SASxport/tests/testUnnamedComponents.R (rev 0) +++ trunk/SASxport/tests/testUnnamedComponents.R 2012-06-21 23:12:34 UTC (rev 1571) @@ -0,0 +1,73 @@ +library(SASxport) + + +##tests +example(read.xport) +write.xport(w$test,file="a.xpt") #1.a +lookup.xport("a.xpt") #1.b +(tmp <- read.xport("a.xpt")) #1.c + +b <- w$test +write.xport(b,file="a.xpt") #2.a +lookup.xport("a.xpt") #2.b +(tmp <- read.xport("a.xpt")) #2.c + +write.xport(test=w$test,file="a.xpt") #3.a +lookup.xport("a.xpt") #3.b +(tmp <- read.xport("a.xpt")) #3.c + +write.xport(test=w$test,z=w$z,file="a.xpt") #4.a +lookup.xport("a.xpt") #4.b +(tmp <- read.xport("a.xpt")) #4.c + +write.xport(w$test,w$z,file="a.xpt") #5.a +lookup.xport("a.xpt") #5.b +(tmp <- read.xport("a.xpt")) #5.c + +write.xport(w$test,z=w$z,file="a.xpt") #6.a +lookup.xport("a.xpt") #6.b +(tmp <- read.xport("a.xpt")) #6.c + +write.xport(list=w,file="a.xpt") #7.a +lookup.xport("a.xpt") #7.b +(tmp <- read.xport("a.xpt")) #7.c + +names(w) <- NULL +write.xport(w[[1]],w[[2]],file="a.xpt") #8.a +lookup.xport("a.xpt") #8.b +(tmp <- read.xport("a.xpt")) #8.c + +names(w) <- NULL +write.xport(list=w,file="a.xpt") #9.a +lookup.xport("a.xpt") #9.b +(tmp <- read.xport("a.xpt")) #9.c + +### Check that we catch invalid parameters +failure <- try( write.xport(5,"a.xpt") ) #10.a +SASxport:::assert( "try-error" %in% class(failure) ) #10.b +(tmp <- read.xport("a.xpt")) #10.c + +failure <- try( write.xport(list(a=5,b=6),"a.xpt") ) #11.a +SASxport:::assert( "try-error" %in% class(failure) ) #11.b +(tmp <- read.xport("a.xpt")) #10.c + +# Check with different list construction function *name* +example(read.xport) +write.xport(list=base::list(w$test,w$z),file="a.xpt") #11.a +lookup.xport("a.xpt") #11.b +(tmp <- read.xport("a.xpt")) #11.c + +# remove names +example(read.xport) +names(w) <- NULL +w[[3]] <- NULL +write.xport(list=w,file="a.xpt") #12.a +lookup.xport("a.xpt") #12.b +(tmp <- read.xport("a.xpt")) #12.c + +# remove variable names +example(read.xport) +colnames(w[[2]]) <- rep("", length=ncol(w[[2]])) +write.xport(list=w,file="a.xpt") #13.a +lookup.xport("a.xpt") #13.b +(tmp <- read.xport("a.xpt")) #13.c This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2012-06-19 19:00:37
|
Revision: 1570 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1570&view=rev Author: warnes Date: 2012-06-19 19:00:31 +0000 (Tue, 19 Jun 2012) Log Message: ----------- Update for gtools 2.7.0. Modified Paths: -------------- trunk/gtools/DESCRIPTION trunk/gtools/inst/NEWS Modified: trunk/gtools/DESCRIPTION =================================================================== --- trunk/gtools/DESCRIPTION 2012-06-19 14:00:10 UTC (rev 1569) +++ trunk/gtools/DESCRIPTION 2012-06-19 19:00:31 UTC (rev 1570) @@ -1,8 +1,8 @@ Package: gtools Title: Various R programming tools Description: Various R programming tools -Version: 2.6.4 -Date: 2010-10-05 +Version: 2.7.0 +Date: 2012-06-19 Author: Gregory R. Warnes. Includes R source code and/or documentation contributed by Ben Bolker and Thomas Lumley Maintainer: Gregory R. Warnes <gr...@wa...> Modified: trunk/gtools/inst/NEWS =================================================================== --- trunk/gtools/inst/NEWS 2012-06-19 14:00:10 UTC (rev 1569) +++ trunk/gtools/inst/NEWS 2012-06-19 19:00:31 UTC (rev 1570) @@ -1,3 +1,20 @@ +gtools 2.7.0 - 2012-06-19 +------------------------- + +New features: + +- smartbind() has a new 'sep' argument to allow specification of the + character(s) used to separate components of constructed column names + +- smartbind() has a new 'verbose' argument to provide details on how + coluumns are being processed + +Bug fixes: + +- smartbind() has been enhanced to improve handling of factor and + ordered factor columns. + + gtools 2.6.2 - 2011-09-28 ------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2012-06-19 14:00:21
|
Revision: 1569 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1569&view=rev Author: warnes Date: 2012-06-19 14:00:10 +0000 (Tue, 19 Jun 2012) Log Message: ----------- Document new 'verbose' argument to smartbind(). Modified Paths: -------------- trunk/gtools/man/smartbind.Rd Modified: trunk/gtools/man/smartbind.Rd =================================================================== --- trunk/gtools/man/smartbind.Rd 2012-06-19 13:56:52 UTC (rev 1568) +++ trunk/gtools/man/smartbind.Rd 2012-06-19 14:00:10 UTC (rev 1569) @@ -5,7 +5,7 @@ Efficient rbind of data frames, even if the column names don't match } \usage{ -smartbind(..., fill=NA, sep=':') +smartbind(..., fill=NA, sep=':', verbose=FALSE) } \arguments{ \item{\dots}{Data frames to combine} @@ -13,6 +13,8 @@ Defaults to \code{NA}. } \item{sep}{Character string used to separate column names when pasting them together.} + \item{verbose}{Logical flag indicating whether to display processing + messages. Defaults to \code{FALSE}.} } \value{ The returned data frame will contain: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2012-06-19 13:57:02
|
Revision: 1568 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1568&view=rev Author: warnes Date: 2012-06-19 13:56:52 +0000 (Tue, 19 Jun 2012) Log Message: ----------- Clean up R CMD check warnings. Modified Paths: -------------- trunk/gtools/R/addLast.R trunk/gtools/R/running.R Modified: trunk/gtools/R/addLast.R =================================================================== --- trunk/gtools/R/addLast.R 2012-06-18 20:32:10 UTC (rev 1567) +++ trunk/gtools/R/addLast.R 2012-06-19 13:56:52 UTC (rev 1568) @@ -1,16 +1,16 @@ addLast <- function( fun ) { if (!is.function(fun)) stop("fun must be a function") - if(!exists(".Last", env=.GlobalEnv)) - assign(".Last", fun, env=.GlobalEnv) + if(!exists(".Last", envir=.GlobalEnv)) + assign(".Last", fun, envir=.GlobalEnv) else { - Last <- get(".Last", env=.GlobalEnv) + Last <- get(".Last", envir=.GlobalEnv) newfun <- function(...) { fun() Last() } - assign(".Last", newfun, env=.GlobalEnv) + assign(".Last", newfun, envir=.GlobalEnv) } } Modified: trunk/gtools/R/running.R =================================================================== --- trunk/gtools/R/running.R 2012-06-18 20:32:10 UTC (rev 1567) +++ trunk/gtools/R/running.R 2012-06-19 13:56:52 UTC (rev 1568) @@ -58,21 +58,21 @@ if(is.null(Y)) # univariate { - funct <- function(which,what,fun,...) fun(what[which],...) + funct.uni <- function(which,what,fun,...) fun(what[which],...) if(simplify) - Xvar <- sapply(run.elements, funct, what=X, fun=fun, ...) + Xvar <- sapply(run.elements, funct.uni, what=X, fun=fun, ...) else - Xvar <- lapply(run.elements, funct, what=X, fun=fun, ...) + Xvar <- lapply(run.elements, funct.uni, what=X, fun=fun, ...) } else # bivariate { - funct <- function(which,XX,YY,fun,...) fun(XX[which],YY[which], ...) + funct.bi <- function(which,XX,YY,fun,...) fun(XX[which],YY[which], ...) if(simplify) - Xvar <- sapply(run.elements, funct, XX=X, YY=Y, fun=fun, ...) + Xvar <- sapply(run.elements, funct.bi, XX=X, YY=Y, fun=fun, ...) else - Xvar <- lapply(run.elements, funct, XX=X, YY=Y, fun=fun, ...) + Xvar <- lapply(run.elements, funct.bi, XX=X, YY=Y, fun=fun, ...) } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2012-06-18 20:32:16
|
Revision: 1567 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1567&view=rev Author: warnes Date: 2012-06-18 20:32:10 +0000 (Mon, 18 Jun 2012) Log Message: ----------- Update NEWS for 2.11.0 release. Modified Paths: -------------- trunk/gdata/inst/NEWS Modified: trunk/gdata/inst/NEWS =================================================================== --- trunk/gdata/inst/NEWS 2012-06-18 20:27:16 UTC (rev 1566) +++ trunk/gdata/inst/NEWS 2012-06-18 20:32:10 UTC (rev 1567) @@ -1,3 +1,21 @@ +Changes in 2.11.0 (2012-06-18) +------------------------------ + +New Features: + +- read.xls() and supporting functions now allow blank lines to be + preserved, rather than skipped, by supplying the argument + "blank.lines.skip=FALSE". The underlying perl function has been + extended to suppor this via an optional "-s" argument which, when + present, *preserves* blank lines during the conversion. (The + default behavior remains unchanged.) + +Other Changes: + +- Add SystemRequirements field specifying that perl is necessary for + gdata to function fully. + + Changes in 2.10.6 (2012-06-12) ------------------------------ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2012-06-18 20:27:22
|
Revision: 1566 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1566&view=rev Author: warnes Date: 2012-06-18 20:27:16 +0000 (Mon, 18 Jun 2012) Log Message: ----------- Bump version number and add SystemRequirements for perl. Modified Paths: -------------- trunk/gdata/DESCRIPTION Modified: trunk/gdata/DESCRIPTION =================================================================== --- trunk/gdata/DESCRIPTION 2012-06-18 20:26:32 UTC (rev 1565) +++ trunk/gdata/DESCRIPTION 2012-06-18 20:27:16 UTC (rev 1566) @@ -2,8 +2,9 @@ Title: Various R programming tools for data manipulation Description: Various R programming tools for data manipulation Depends: R (>= 2.13.0) +SystemRequirements: perl Imports: gtools -Version: 2.10.6 +Version: 2.11.0 Date: 2012-06-08 Author: Gregory R. Warnes, with contributions from Ben Bolker, Gregor Gorjanc, Gabor Grothendieck, Ales Korosec, Thomas Lumley, Don MacQueen, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2012-06-18 20:26:38
|
Revision: 1565 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1565&view=rev Author: warnes Date: 2012-06-18 20:26:32 +0000 (Mon, 18 Jun 2012) Log Message: ----------- read.xls() and supporting functions now allow blank lines to be preserved, rather than skipped, by supplying the argument "blank.lines.skip=FALSE". The underlying perl function has been extended to suppor this via an optional "-s" argument which, when present, *preserves* blank lines during the conversion. Modified Paths: -------------- trunk/gdata/R/xls2sep.R trunk/gdata/inst/perl/xls2csv.pl trunk/gdata/man/read.xls.Rd trunk/gdata/tests/test.read.xls.R trunk/gdata/tests/test.read.xls.Rout.save Modified: trunk/gdata/R/xls2sep.R =================================================================== --- trunk/gdata/R/xls2sep.R 2012-06-13 01:10:28 UTC (rev 1564) +++ trunk/gdata/R/xls2sep.R 2012-06-18 20:26:32 UTC (rev 1565) @@ -1,19 +1,30 @@ ## s$Id$ -xls2csv <- function(xls, sheet=1, verbose=FALSE, ..., perl="perl") - xls2sep(xls=xls, sheet=sheet, verbose=verbose, ..., method="csv", +xls2csv <- function(xls, sheet=1, verbose=FALSE, blank.lines.skip=TRUE, + ..., perl="perl") + xls2sep(xls=xls, sheet=sheet, verbose=verbose, + blank.lines.skip=blank.lines.skip, ..., method="csv", perl=perl) -xls2tab <- function(xls, sheet=1, verbose=FALSE, ..., perl="perl") - xls2sep(xls=xls, sheet=sheet, verbose=verbose, ..., method="tab", +xls2tab <- function(xls, sheet=1, verbose=FALSE, blank.lines.skip=TRUE, + ..., perl="perl") + xls2sep(xls=xls, sheet=sheet, verbose=verbose, + blank.lines.skip=blank.lines.skip, ..., method="tab", perl=perl) -xls2tsv <- function(xls, sheet=1, verbose=FALSE, ..., perl="perl") - xls2sep(xls=xls, sheet=sheet, verbose=verbose, ..., method="tsv", +xls2tsv <- function(xls, sheet=1, verbose=FALSE, blank.lines.skip=TRUE, + ..., perl="perl") + xls2sep(xls=xls, sheet=sheet, verbose=verbose, + blank.lines.skip=blank.lines.skip, ..., method="tsv", perl=perl) -xls2sep <- function(xls, sheet=1, verbose=FALSE, ..., - method=c("csv","tsv","tab"), perl = perl) +xls2sep <- function(xls, + sheet=1, + verbose=FALSE, + blank.lines.skip=TRUE, + ..., + method=c("csv","tsv","tab"), + perl = perl) { method <- match.arg(method) @@ -69,9 +80,18 @@ ## ## + ## blank.lines.skip + ## + if (blank.lines.skip) + skipBlank="" + else + skipBlank="-s" + + ## ## execution command cmd <- paste(shQuote(perl), shQuote(script), + skipBlank, # flag is not quoted shQuote(xls), shQuote(targetFile), shQuote(sheet), Modified: trunk/gdata/inst/perl/xls2csv.pl =================================================================== --- trunk/gdata/inst/perl/xls2csv.pl 2012-06-13 01:10:28 UTC (rev 1564) +++ trunk/gdata/inst/perl/xls2csv.pl 2012-06-18 20:26:32 UTC (rev 1565) @@ -11,6 +11,7 @@ #use Spreadsheet::XLSX; use POSIX; use File::Spec::Functions; +use Getopt::Std; ## # Try to load the modules we need @@ -26,7 +27,8 @@ my($row, $col, $sheet, $cell, $usage, $targetfile,$basename, $sheetnumber, $filename, $volume, $directories, $whoami, - $sep, $sepName, $sepLabel, $sepExt); + $sep, $sepName, $sepLabel, $sepExt, + $skipBlankLines, %switches); ## ## Figure out whether I'm called as xls2csv.pl or xls2tab.pl @@ -66,11 +68,11 @@ ## $usage = <<EOF; -$whoami <excel file> [<output file>] [<worksheet number>] +$whoami [-s] <excel file> [<output file>] [<worksheet number>] -Translate the Microsoft Excel spreadsheet file contained in -<excel file> into $sepName separated value format ($sepLabel) and -store in <output file>. +Translate the Microsoft Excel spreadsheet file contained in <excel +file> into $sepName separated value format ($sepLabel) and store in +<output file>, skipping blank lines unless "-s" is present. If <output file> is not specified, the output file will have the same name as the input file with '.xls', or 'xlsx' removed and '.$sepExt' @@ -85,6 +87,12 @@ ## parse arguments ## +# Handle switches (currently, just -s) +getopts('s', \%switches); +$skipBlankLines=!$switches{s}; + +# Now the rest of the arguments + if( !defined($ARGV[0]) ) { print $usage; @@ -253,12 +261,12 @@ } # skip blank/empty lines - if( $outputLine =~ /^[$sep ]*$/ ) - { - $cumulativeBlankLines++ - } + if( $skipBlankLines && ($outputLine =~ /^[$sep ]*$/) ) + { + $cumulativeBlankLines++ + } else - { + { print OutFile "$outputLine \n" } } @@ -266,7 +274,7 @@ close OutFile; print " (Ignored $cumulativeBlankLines blank lines.)\n" - if ($cumulativeBlankLines); + if $skipBlankLines; print "\n"; } Modified: trunk/gdata/man/read.xls.Rd =================================================================== --- trunk/gdata/man/read.xls.Rd 2012-06-13 01:10:28 UTC (rev 1564) +++ trunk/gdata/man/read.xls.Rd 2012-06-18 20:26:32 UTC (rev 1565) @@ -9,11 +9,11 @@ \usage{ read.xls(xls, sheet=1, verbose=FALSE, pattern, na.strings=c("NA","#DIV/0!"), ..., method=c("csv","tsv","tab"), perl="perl") -xls2csv(xls, sheet=1, verbose=FALSE, ..., perl="perl") -xls2tab(xls, sheet=1, verbose=FALSE, ..., perl="perl") -xls2tsv(xls, sheet=1, verbose=FALSE, ..., perl="perl") -xls2sep(xls, sheet=1, verbose=FALSE, ..., method=c("csv","tsv","tab"), - perl="perl") +xls2csv(xls, sheet=1, verbose=FALSE, blank.lines.skip=TRUE, ..., perl="perl") +xls2tab(xls, sheet=1, verbose=FALSE, blank.lines.skip=TRUE, ..., perl="perl") +xls2tsv(xls, sheet=1, verbose=FALSE, blank.lines.skip=TRUE, ..., perl="perl") +xls2sep(xls, sheet=1, verbose=FALSE, blank.lines.skip=TRUE, ..., + method=c("csv","tsv","tab"), perl="perl") } \arguments{ \item{xls}{path to the Microsoft Excel file. Supports "http://", @@ -27,7 +27,10 @@ \item{method}{intermediate file format, "csv" for comma-separated and "tab" for tab-separated} \item{na.strings}{a character vector of strings which are to be interpreted - as 'NA' values. See \code{\link[utils]{read.table}} for details.} + as 'NA' values. See \code{\link[utils]{read.table}} for + details.} + \item{blank.lines.skip}{logical flag indicating whether blank lines in + the orginal file should be ignored.} \item{...}{additional arguments to read.table. The defaults for read.csv() are used.} } Modified: trunk/gdata/tests/test.read.xls.R =================================================================== --- trunk/gdata/tests/test.read.xls.R 2012-06-13 01:10:28 UTC (rev 1564) +++ trunk/gdata/tests/test.read.xls.R 2012-06-18 20:26:32 UTC (rev 1565) @@ -70,3 +70,21 @@ data <- read.xls(exampleFile2007, sheet="Sheet with initial text", skip=2) print(data) } + + +## Check handling of skip.blank.lines=FALSE + +example.skip <- read.xls(exampleFile, sheet=2, blank.lines.skip=FALSE) +example.skip + +if( 'XLSX' %in% xlsFormats() ) + { + example.x.skip <- read.xls(exampleFile2007, sheet=2, blank.lines.skip=FALSE) + example.x.skip + } + + + + + + Modified: trunk/gdata/tests/test.read.xls.Rout.save =================================================================== --- trunk/gdata/tests/test.read.xls.Rout.save 2012-06-13 01:10:28 UTC (rev 1564) +++ trunk/gdata/tests/test.read.xls.Rout.save 2012-06-18 20:26:32 UTC (rev 1565) @@ -642,6 +642,36 @@ 3 NA ThirdRow 3 2 1 NA Red 4 NA FourthRow 4 3 2 1 Black > +> +> ## Check handling of skip.blank.lines=FALSE +> +> example.skip <- read.xls(exampleFile, sheet=2, blank.lines.skip=FALSE) +> example.skip + X D E. F G Factor +1 FirstRow 1 NA NA NA Red +2 SecondRow 2 1 NA NA Green +3 NA NA NA NA +4 ThirdRow 3 2 1 NA Red +5 FourthRow 4 3 2 1 Black +> +> if( 'XLSX' %in% xlsFormats() ) ++ { ++ example.x.skip <- read.xls(exampleFile2007, sheet=2, blank.lines.skip=FALSE) ++ example.x.skip ++ } + X D E. F G Factor +1 FirstRow 1 NA NA NA Red +2 SecondRow 2 1 NA NA Green +3 NA NA NA NA +4 ThirdRow 3 2 1 NA Red +5 FourthRow 4 3 2 1 Black +> +> +> +> +> +> +> > proc.time() user system elapsed - 2.916 0.357 3.366 + 3.259 0.383 3.748 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2012-06-13 01:10:34
|
Revision: 1564 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1564&view=rev Author: warnes Date: 2012-06-13 01:10:28 +0000 (Wed, 13 Jun 2012) Log Message: ----------- - nobs.default needs to handle logical vectors in addition to numeric vectors. - update DESCRIPTION and NEWS for 2.10.6. Modified Paths: -------------- trunk/gdata/DESCRIPTION trunk/gdata/R/nobs.R trunk/gdata/inst/NEWS Modified: trunk/gdata/DESCRIPTION =================================================================== --- trunk/gdata/DESCRIPTION 2012-06-13 01:00:07 UTC (rev 1563) +++ trunk/gdata/DESCRIPTION 2012-06-13 01:10:28 UTC (rev 1564) @@ -3,7 +3,7 @@ Description: Various R programming tools for data manipulation Depends: R (>= 2.13.0) Imports: gtools -Version: 2.10.5 +Version: 2.10.6 Date: 2012-06-08 Author: Gregory R. Warnes, with contributions from Ben Bolker, Gregor Gorjanc, Gabor Grothendieck, Ales Korosec, Thomas Lumley, Don MacQueen, Modified: trunk/gdata/R/nobs.R =================================================================== --- trunk/gdata/R/nobs.R 2012-06-13 01:00:07 UTC (rev 1563) +++ trunk/gdata/R/nobs.R 2012-06-13 01:10:28 UTC (rev 1564) @@ -21,4 +21,3 @@ ## Now provided by 'stats' package, so provide alias to satisfy ## dependencies nobs.lm <- stats:::nobs.lm - Modified: trunk/gdata/inst/NEWS =================================================================== --- trunk/gdata/inst/NEWS 2012-06-13 01:00:07 UTC (rev 1563) +++ trunk/gdata/inst/NEWS 2012-06-13 01:10:28 UTC (rev 1564) @@ -1,8 +1,31 @@ -Changes in 2.10.2 (2012-06-06) +Changes in 2.10.6 (2012-06-12) ------------------------------ Bug fixes: +- gdata::nobs.default() needs to handle logical vectors in addition to + numeric vectors. + +Changes in 2.10.{3,4,5} (2012-06-08) +------------------------------------ + +Bug fixes: + +- Mark example for installXLSsupport() as dontrun so R CMD check won't + fail on systems where PERL is not fully functional. + +- Correct name of installXLSsupport() in tests/test.read.xls.R. + +Other Changes: + +- Add dependency on R 2.13.0, since that is when stats::nobs appeared. + + +Changes in 2.10.2 (2012-06-06) +--------------------------------------- + +Bug fixes: + - Fix issues in nobs.default identified in testing with the gmodels package. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2012-06-13 01:00:14
|
Revision: 1563 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1563&view=rev Author: warnes Date: 2012-06-13 01:00:07 +0000 (Wed, 13 Jun 2012) Log Message: ----------- nobs.default needs to handle logical as well as numeric vectors. Modified Paths: -------------- trunk/gdata/R/nobs.R Modified: trunk/gdata/R/nobs.R =================================================================== --- trunk/gdata/R/nobs.R 2012-06-08 22:04:34 UTC (rev 1562) +++ trunk/gdata/R/nobs.R 2012-06-13 01:00:07 UTC (rev 1563) @@ -8,7 +8,7 @@ nobs.default <- function(object, ...) { - if(is.numeric(object)) + if(is.numeric(object) || is.logical(object)) sum( !is.na(object) ) else stats:::nobs.default(object, ...) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2012-06-08 23:14:51
|
Revision: 1561 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1561&view=rev Author: warnes Date: 2012-06-08 21:59:52 +0000 (Fri, 08 Jun 2012) Log Message: ----------- fix incorrect function name Modified Paths: -------------- trunk/gdata/tests/test.read.xls.R Modified: trunk/gdata/tests/test.read.xls.R =================================================================== --- trunk/gdata/tests/test.read.xls.R 2012-06-08 20:02:21 UTC (rev 1560) +++ trunk/gdata/tests/test.read.xls.R 2012-06-08 21:59:52 UTC (rev 1561) @@ -2,7 +2,7 @@ if ( ! 'XLSX' %in% xlsFormats() ) { - try( installXLSXModules() ) + try( installXLSXsupport() ) } # iris.xls is included in the gregmisc package for use as an example This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |