Skip to content

Commit 90136b1

Browse files
warnesgaborcsardi
authored andcommitted
version 2.13.2
1 parent fcd9610 commit 90136b1

28 files changed

+2021
-1671
lines changed

ChangeLog

Lines changed: 221 additions & 773 deletions
Large diffs are not rendered by default.

DESCRIPTION

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ Description: Various R programming tools for data manipulation
44
Depends: R (>= 2.13.0)
55
SystemRequirements: perl
66
Imports: gtools
7-
Version: 2.12.0.2
8-
Date: 2012-10-12
9-
Author: Gregory R. Warnes, with contributions from Ben Bolker, Gregor
10-
Gorjanc, Gabor Grothendieck, Ales Korosec, Thomas Lumley, Don
11-
MacQueen, Arni Magnusson, Jim Rogers, and others
12-
Maintainer: Gregory Warnes <[email protected]>
7+
Version: 2.13.2
8+
Date: 2013-06-28
9+
Author: Gregory R. Warnes, Ben Bolker, Gregor Gorjanc, Gabor
10+
Grothendieck, Ales Korosec, Thomas Lumley, Don MacQueen, Arni
11+
Magnusson, Jim Rogers, and others
12+
Maintainer: Gregory R. Warnes <[email protected]>
1313
License: GPL-2
14-
Packaged: 2013-04-05 12:19:55 UTC; ripley
15-
Repository: CRAN
16-
Date/Publication: 2013-04-05 15:54:45
1714
NeedsCompilation: no
15+
Packaged: 2013-07-01 21:10:12 UTC; warnes
16+
Repository: CRAN
17+
Date/Publication: 2013-07-02 07:00:38

MD5

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
1-
483f69e6cdc20db9b61860670972684d *ChangeLog
2-
c55297619d430b9b718fab75a1020702 *DESCRIPTION
1+
d06e90db42ff353bcd72b174500bef41 *ChangeLog
2+
06148ef05a2d1fb9e7dc63726d2dca66 *DESCRIPTION
33
905fe9c5be6e143737163bc6317e6640 *INSTALL
4-
632a2df95d6003a608b5579ca2f1a9dd *NAMESPACE
5-
8397287f5ada0a978e40002ccdb2ba56 *NEWS
4+
4c9c62a120fea1d885151bb9e1f5e175 *NAMESPACE
5+
e8bc3126916e8abb0a56c6afffb64d79 *NEWS
66
92e3ca5e31d594044b8325a441142c37 *R/Args.R
77
94976a0bed5195b50511e200d1711280 *R/ConvertMedUnits.R
8-
0f26158c70aca9269f5304b440e5ab35 *R/aggregate.table.R
8+
eea4eaca4f623886f3b7381cc075778e *R/aggregate.table.R
9+
38de1344cd5bc79f32a0b42e48b43965 *R/ans.R
910
78e0c21cf9e4693553a4174d9d3b3c80 *R/bindData.R
1011
df4bed53c71599dde15cbf23b4ca645a *R/case.R
1112
ea9399bf2240d9c3a536da45bcf34cd2 *R/cbindX.R
1213
d4034554742c82cdf9c7da28c5e5614c *R/centerText.R
1314
d1aa5d0677fb46d53b4e4628b18159c2 *R/combine.R
1415
23a1a2a8bf811331e02ccd5668567cf4 *R/drop.levels.R
16+
1e65b516ecac8ecc4d9caa8d66c6e494 *R/duplicated2.R
1517
3896b0c9e1e81f87adb9c876f3ecfbda *R/elem.R
1618
0388011f483caa3314a0688a376f7cc5 *R/env.R
1719
7f43c48b182d910961f643876fefbdf9 *R/findPerl.R
1820
4f9c6613afb87d8360ea897bbc485fe7 *R/frameApply.R
1921
d6474a86ab986d0cbcc8712797bbb57b *R/getDateTimeParts.R
20-
3744dcc5ce917b5fb85dff5259091a8d *R/installXLSXsupport.R
22+
a4f086ff4289d532ac61ca2ecc5a8862 *R/installXLSXsupport.R
2123
037266e58fb3a611b3a56bb09c898abd *R/interleave.R
2224
e9594e1749df0f487eaab95db4253e59 *R/is.what.R
2325
4fc53a992903de783b5cd9a515f1242b *R/keep.R
24-
91b34736c2ac21d79e5b417554b52a48 *R/ll.R
26+
b17363a9b301491f375f1b898276c588 *R/ll.R
2527
b75ac1b645046c8028d8014de255bd25 *R/ls.funs.R
2628
17850c5a2e9185aff447f7e19a125cb6 *R/mapLevels.R
2729
e7d2246f66781fe99981b2dd083dd6cb *R/matchcols.R
@@ -34,7 +36,7 @@ aaace07c7a900ddec695220ad10e0d14 *R/rename.vars.R
3436
8dbe70d52ae3d60a07aa928fc3c62413 *R/reorder.R
3537
cef4f8eb74136397feee111cf921676f *R/resample.R
3638
df4f4b68dcfee49ff4f57fd008ce6dcc *R/runRUnitTests.R
37-
cc1e120d70616e025a9a8fc67aa16635 *R/sheetCount.R
39+
f126721102aa7f6d258e74bf6215b831 *R/sheetCount.R
3840
dffd0684af87ed05ae550eab75f0787c *R/startsWith.R
3941
f511d0ee44c0d69a2d8e6ad195421243 *R/trim.R
4042
05f7763f8efeef44932e4c47cfc091ff *R/trimSum.R
@@ -43,11 +45,11 @@ f511d0ee44c0d69a2d8e6ad195421243 *R/trim.R
4345
d124821046808c5e8492a6db12ac0be4 *R/upperTriangle.R
4446
5a0dcdddde5d9c1ec0d215d12f323500 *R/wideByFactor.R
4547
a568b5b2ffcd3552c2ccf06d17e88d01 *R/write.fwf.R
46-
04158490321d44e4853a88b30c532650 *R/xls2sep.R
47-
b9a9e578c6bd810be057023138008e1c *R/xlsFormats.R
48-
0df2e08650ae305a620ceb84ca798a63 *data/MedUnits.rda
49-
483f69e6cdc20db9b61860670972684d *inst/ChangeLog
50-
8397287f5ada0a978e40002ccdb2ba56 *inst/NEWS
48+
41c99f4c80f3c613c8173f93ec9c3bc0 *R/xls2sep.R
49+
84c93b4e26e20d6ff792637f41c71df3 *R/xlsFormats.R
50+
494447a9a3b7a389e79a556a1c356caa *data/MedUnits.rda
51+
d06e90db42ff353bcd72b174500bef41 *inst/ChangeLog
52+
e8bc3126916e8abb0a56c6afffb64d79 *inst/NEWS
5153
ac512b1ebd4d71ac96b2a4d5288d53cb *inst/bin/xls2csv
5254
ce0b4437c51faccb3595d986e8acae80 *inst/bin/xls2csv.bat
5355
99af68b9933865da35d30b3f0d4606be *inst/doc/Rnews.dtx
@@ -130,21 +132,23 @@ b232e2a1977dc0d9d944a094a34a7656 *inst/unitTests/runit.trim.R
130132
222994e34ee8182cee4f844131fc4753 *inst/unitTests/runit.unknown.R
131133
07c0f9fc38612b196f2d7449c133fde2 *inst/unitTests/runit.wideByFactor.R
132134
6ef53cf4cb6265365863cc9a58c4c1e9 *inst/unitTests/runit.write.fwf.R
133-
07387258cd5a208a2aae70441c2112e0 *inst/xls/ExampleExcelFile.xls
135+
59166d9d1e10ea9d544aad1d1a4ed978 *inst/xls/ExampleExcelFile.xls
134136
59f44d54c2c09ee757af7b6724dc9d63 *inst/xls/ExampleExcelFile.xlsx
135137
7c16d3cfd37123f3c321c12a92b9269a *inst/xls/iris.xls
136138
8a0467a49bfb791295925cb6a372b1ff *inst/xls/latin-1.xls
137139
36e751188a4e3d37ce3be57d2152922a *inst/xls/latin-1.xlsx
138140
24a1020fb457c398c620457ad114e245 *man/Args.Rd
139-
64979ed4d4cf6136b74b38290bc04e76 *man/ConvertMedUnits.Rd
140-
abfda9fcf25a1a9306348b22d73e3049 *man/MedUnits.Rd
141+
b0dec88638d111fb8b0c75ebfd99cdfd *man/ConvertMedUnits.Rd
142+
673f2150582676c574a306697b29ffa5 *man/MedUnits.Rd
141143
8d8f92632f70e98c2063fd8ce368e5e7 *man/aggregate.table.Rd
144+
6fcbcc90f241aa78bc0cd4ba479ac9bd *man/ans.Rd
142145
140de526fc0a3c819dcd687e7bb3ed77 *man/bindData.Rd
143146
a4c69a81cca648bfdc2f6913229b4e0e *man/case.Rd
144147
640626fce10a1b97ad82fd594f18b058 *man/cbindX.Rd
145148
ea80105996fa8d335490899cc37a5c35 *man/centerText.Rd
146149
0c1246172eb620aed35dbfbc3e411b74 *man/combine.Rd
147150
fca345001344f5bfcbaac5f79e6f0762 *man/drop.levels.Rd
151+
a471e3c2a2b1ca5550a1822d5620e848 *man/duplicated2.Rd
148152
28b102aeb6f3c62fe6b3b40fefa4c005 *man/elem.Rd
149153
e45e3959608492f8e12298d221e605e3 *man/env.Rd
150154
73aeb6a00e393012dfc4fb1e0b8fc15a *man/frameApply.Rd
@@ -177,8 +181,12 @@ f6615191c438d8526183c169fcb38224 *man/runRUnitTests.Rd
177181
ad219282ec6913083b82073691923f9b *man/wideByFactor.Rd
178182
56d52a59a9c4f5132d5ae69673823ae8 *man/write.fwf.Rd
179183
8a9c1fe9d0316d0b98e6d353c2b7a6cf *man/xlsFormats.Rd
180-
5c276e204256712fe011de32488770b0 *tests/test.read.xls.R
181-
95fffc8526e8ecf6570879b9a9b9a18d *tests/test.read.xls.Rout.save
184+
10fe383026608ee1cf2c8f1b70a02c5b *tests/test.read.xls.R
185+
b829acdc86095be7759e0d001b8e9599 *tests/test.read.xls.Rout.save
182186
dee3232474b92bcdf1ad75ca31080792 *tests/test.write.fwf.eol.R
183187
b32b0eb85790d71ea6025ae5eca71fb1 *tests/tests.write.fwf.R
184-
c44523282c4058a5a820be92dd93c13f *tests/tests.write.fwf.Rout.save
188+
dba6d4c18936f97e03225af5be4743ed *tests/tests.write.fwf.Rout.save
189+
99af68b9933865da35d30b3f0d4606be *vignettes/Rnews.dtx
190+
a7982b90f82857e34a253df2be42d7c1 *vignettes/Rnews.sty
191+
afcc7e1ba12e2aab12a4349fc8470d08 *vignettes/mapLevels.Rnw
192+
a968a07310286934daaea108e3f915f4 *vignettes/unknown.Rnw

NAMESPACE

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22
export(
33
.onAttach,
4+
ans,
45
Args,
56
aggregate.table,
67
bindData,
@@ -10,6 +11,7 @@ export(
1011
combine,
1112
ConvertMedUnits,
1213
drop.levels,
14+
duplicated2,
1315
elem,
1416
env,
1517
frameApply,

NEWS

Lines changed: 64 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,64 @@
1-
Changes in 2.12.0 (2012-10-12)
1+
Changes in 2.13.2 (2013-06-28)
2+
------------------------------
3+
4+
Enhancements:
5+
6+
- Simplify ll() by converting a passed list to an environment,
7+
avoiding the need for special casing and the use of attach/detach.
8+
9+
- Working of deprecation warning message in aggregate.table clarified.
10+
11+
Changes in 2.13.1 (2013-03-24)
12+
------------------------------
13+
14+
Enhancements:
15+
16+
- Replaced calls to depreciated function ".path.package" with the new
17+
public function "path.package".
18+
19+
20+
Changes in 2.13.0 (2012-09-20)
21+
-----------------------------
22+
23+
New features:
24+
25+
- New 'duplicated2' function which returns TRUE for *all* elements
26+
that are duplicated, including the first, contributed by Liviu
27+
Andronic. This differs from 'duplicated', which only returns the
28+
second and following (second-to last and previous when
29+
'fromLast=TRUE') duplicate elements.
30+
31+
- New 'ans' functon to return the value of the last evaluated
32+
top-level function (a convenience function for accessing
33+
.Last.value), contributed by Liviu Andonic.
34+
35+
Bug Fixes:
36+
37+
- On windows, warning messages printed to stdout by perl were being
38+
included in the return value from 'system', resulting in errors in
39+
'sheetCount' and 'sheetNames'. Corrected.
40+
41+
- The 'MedUnits' column names 'SIUnits' and 'ConventionalUnits' were
42+
reversed and misspelled.
43+
44+
45+
Changes in 2.12.0 (2012-09-12)
246
------------------------------
347

448
Other Changes:
549

650
- 'stats::aggregate' was made into a generic on 27-Jan-2010, so that
751
attempting to call 'aggregate' on a 'table' object will now
852
incorrectly call 'aggregate.table'. Since 'aggregate.table' can be
9-
replaced by a call to tapply using two index vectors, e.g.
10-
aggregate.table(x, by1=a, by2=b, mean)
11-
can be replaced by
53+
replaced by a call to tapply using two index vectors, e.g.
54+
aggregate.table(x, by1=a, by2=b, mean)
55+
can be replaced by
1256
tapply(x, INDEX=list(a, b), FUN=mean),
1357
the 'aggregate.table' function will now display a warning that it
1458
is depreciated and recommending the equivalent call to tapply. It
1559
will be removed entirely in a future version of gdata.
1660

17-
Changes in 2.11.1 (2012-09-22)
61+
Changes in 2.11.1 (2012-08-22)
1862
------------------------------
1963

2064
Enhancements:
@@ -136,7 +180,7 @@ CHANGES IN 2.8.1 (2011-04-15)
136180

137181
Enhancements:
138182

139-
- nPairs() gains a summary method that shows how many times each variable
183+
- nPairs() gains a summary method that shows how many times each variable
140184
is known, while the other variable of a pair is not
141185

142186
Bug fixes:
@@ -197,7 +241,7 @@ Bug Fixes:
197241
build issues, particularly on Windows.
198242

199243
- All perl code can now operate (but generate warnings) when perl modules Compress::Raw::Zlib and
200-
Spreadsheet::XLSX when are not installed.
244+
Spreadsheet::XLSX when are not installed.
201245

202246
- Also update Greg's email address.
203247

@@ -206,8 +250,8 @@ CHANGES IN 2.7.1 (2010-02-19)
206250

207251
Enhancements:
208252

209-
- on Windows attempts to locate ActiveState perl if perl= not specified and
210-
Rtools perl would have otherwise been used in read.xls and other perl
253+
- on Windows attempts to locate ActiveState perl if perl= not specified and
254+
Rtools perl would have otherwise been used in read.xls and other perl
211255
dependent functions.
212256

213257
CHANGES IN 2.7.0 (2010-01-25)
@@ -235,7 +279,7 @@ Enhancements:
235279

236280
New Functions:
237281

238-
- sheetCount() and sheetNames() to determine the number and names of
282+
- sheetCount() and sheetNames() to determine the number and names of
239283
worksheets in an Excel file, respectively.
240284

241285
Bug Fixes:
@@ -260,7 +304,7 @@ CHANGES IN 2.6.0 (2009-07-15)
260304
Bug Fixes
261305

262306
- Correct minor typos & issues in man pages for write.fwf(),
263-
resample() (Greg Warnes)
307+
resample() (Greg Warnes)
264308

265309
- Correct calculation of object sizes in env() and ll() (Gregor Gorjanc)
266310

@@ -272,20 +316,20 @@ New Features
272316
- Enhanced function object.size that returns the size of multiple
273317
objects. There is also a handy print method that can print size of
274318
an object in "human readable" format when
275-
options(humanReadable=TRUE)
276-
or
277-
print(object.size(x), humanReadable=TRUE).
278-
(Gregor Gorjanc)
319+
options(humanReadable=TRUE)
320+
or
321+
print(object.size(x), humanReadable=TRUE).
322+
(Gregor Gorjanc)
279323

280324
- New function wideByFactor that reshapes given dataset by a given
281-
factor - it creates a "multivariate" data.frame. (Gregor Gorjanc)
325+
factor - it creates a "multivariate" data.frame. (Gregor Gorjanc)
282326

283327
- New function nPairs that gives the number of variable pairs in a
284-
data.frame or a matrix. (Gregor Gorjanc)
328+
data.frame or a matrix. (Gregor Gorjanc)
285329

286330
- New functions getYear, getMonth, getDay, getHour, getMin, and getSec
287331
for extracting the date/time parts from objects of a date/time
288-
class. (Gregor Gorjanc)
332+
class. (Gregor Gorjanc)
289333

290334
- New function bindData that binds two data frames into a multivariate
291335
data frame in a different way than merge. (Gregor Gorjanc)
@@ -307,7 +351,7 @@ CHANGES IN 2.5.0
307351

308352
- New function bindData that binds two data frames into a multivariate data frame
309353
in a different way than merge.
310-
354+
311355
- New function wideByFactor that reshapes given dataset by a given factor -
312356
it creates a "multivariate" data.frame.
313357

@@ -321,7 +365,7 @@ CHANGES IN 2.5.0
321365

322366
- New function cbindX that can bind objects with different number of rows.
323367

324-
- write.fwf gains the width argument. The value for unknown can increase or
368+
- write.fwf gains the width argument. The value for unknown can increase or
325369
decrease the width of the columns. Additional tests and documentation fixes.
326370

327371
CHANGES IN 2.4.2 (2008-05-11)

R/aggregate.table.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# $Id: aggregate.table.R 1605 2012-09-12 17:39:42Z warnes $
1+
# $Id: aggregate.table.R 1681 2013-06-28 20:26:56Z warnes $
22

3-
aggregate.table <- function(x, by1, by2, FUN=mean, ... )
3+
aggregate.table <- function(x, by1, by2, FUN=mean, ...)
44
{
5-
warning("'aggregate.table' is depreciated.",
5+
warning("'aggregate.table' is deprecated and will be removed in a future version of the gdata package. ",
66
"Please use 'tapply(X=",
77
deparse(substitute(x)),
88
", INDEX=list(",

R/ans.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ans <- function() .Last.value

R/duplicated2.R

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
duplicated2 <- function(x, bothWays=TRUE, ...)
2+
{
3+
if(!bothWays) {
4+
return(duplicated(x, ...))
5+
} else if(bothWays) {
6+
return((duplicated(x, ...) | duplicated(x, fromLast=TRUE, ...)))
7+
}
8+
}

R/installXLSXsupport.R

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ installXLSXsupport <- function(perl="perl", verbose=FALSE)
77
findPerl(verbose = verbose)
88
else
99
findPerl(perl, verbose = verbose)
10-
10+
1111
##
1212
## directories
13-
package.dir <- path.package('gdata')
13+
package.dir <- find.package('gdata')
1414
perl.dir <- file.path(package.dir,'perl')
1515
##
1616
##
1717

1818
cmd <- "install_modules.pl"
1919
sc <- file.path(perl.dir, cmd)
20-
20+
2121
##
2222
##
2323

@@ -53,6 +53,6 @@ installXLSXsupport <- function(perl="perl", verbose=FALSE)
5353
else
5454
{
5555
stop("\nUnable to install Perl XLSX support libraries.\n\n")
56-
invisible(FALSE)
57-
}
56+
invisible(FALSE)
57+
}
5858
}

R/ll.R

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,7 @@ ll <- function(pos=1, unit="KB", digits=0, dim=FALSE, sort=FALSE, class=NULL,
3535
if(is.character(pos)) # pos is an environment name
3636
pos <- match(pos, search())
3737
if(is.list(pos)) # pos is a list-like object
38-
{
39-
if(length(pos) == 0)
40-
return(data.frame())
41-
attach(pos, pos=2, warn.conflicts=FALSE)
42-
original.rank <- rank(names(pos))
43-
was.list <- TRUE
44-
pos <- 2
45-
}
46-
else
47-
{
48-
was.list <- FALSE
49-
}
38+
pos <- as.environment(pos)
5039
if(length(ls(pos,...)) == 0) # pos is an empty environment
5140
{
5241
object.frame <- data.frame()
@@ -77,12 +66,6 @@ ll <- function(pos=1, unit="KB", digits=0, dim=FALSE, sort=FALSE, class=NULL,
7766
object.frame <- cbind(object.frame,
7867
Dim=sapply(ls(pos,...),get.object.dim,pos=pos))
7968
}
80-
if(was.list)
81-
{
82-
detach(pos=2)
83-
if(!sort)
84-
object.frame <- object.frame[original.rank, ]
85-
}
8669
if(!is.null(class))
8770
{
8871
include <- object.frame$Class %in% class

0 commit comments

Comments
 (0)