Skip to content

Commit

Permalink
Format and update NEWS
Browse files Browse the repository at this point in the history
  • Loading branch information
crowding authored and wibeasley committed Jan 3, 2014
1 parent 1d7c317 commit c3dd711
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
16 changes: 9 additions & 7 deletions NEWS
@@ -1,15 +1,17 @@
Version 1.8.0.99
------------------------------------------------------------------------------
Improvements to `rbind.fill` and by extension `*dply` and `join`:

* `rbind.fill` handles non-numeric matrix columns (i.e. factors, characters, lists)
* `rbind.fill` avoids array copying which had produced quadratic time
complexity. `*dply` of large numbers of groups should be faster.
(Contributed by Peter Meilstrup)

* `rbind.fill(x,y)` converts factor columns of Y to
character when columns of X are character. (Contributed by Peter Meilstrup)
* `rbind.fill` handles non-numeric matrix columns (i.e. factor arrays,
character arrays, list arrays); also arrays with more than 2
dimensions can be used. (Contributed by Peter Meilstrup)

* `join(x,y)` and `match_df(x,y)` now work when the key column in X is
character and Y is factor. (Contributed by Peter Meilstrup)
* `rbind.fill(x,y)` converts factor columns of Y to character when
columns of X are character. `join(x,y)` and `match_df(x,y)` now work
when the key column in X is character and Y is factor. (Contributed
by Peter Meilstrup)

* Fix faulty array allocation which caused problems when using `split_indices`
with large (> 2^24) vectors. (Fixes #131)
Expand Down
2 changes: 1 addition & 1 deletion R/rbind-fill.r
Expand Up @@ -196,7 +196,7 @@ allocate_column <- function(example, nrows, dfs, var) {
class(column) <<- class
column
} else {
what <- as.POSIXct(what, tz=tzone)
what <- as.POSIXct(what, tz = tzone)
eval(assignment)
}
},
Expand Down
10 changes: 5 additions & 5 deletions inst/tests/test-rbind.r
Expand Up @@ -211,8 +211,8 @@ test_that("zero col data frames ok", {
})

rbind_time <- function(size,
classes=c("numeric", "character",
"array", "factor", "time")) {
classes = c("numeric", "character",
"array", "factor", "time")) {
unit <- quickdf(list(numeric = 1:3,
character = c("a", "b", "c"),
array = array(1:6, c(3,2)),
Expand All @@ -224,7 +224,7 @@ rbind_time <- function(size,

get_rbind_times <- function(...) {
rbind_time(10) #warm up/JIT
mdply(.fun=rbind_time, ...)
mdply(.fun = rbind_time, ...)
}

expect_linear_enough <- function(timings, size=2^10, threshold=0.03) {
Expand All @@ -245,12 +245,12 @@ test_that("rbind.fill performance linear", {

test_that("rbind.fill performance linear with factors", {
timings <- get_rbind_times(data.frame(size = 2^(1:10)),
classes=c("factor"))
classes=c("factor"))
expect_linear_enough(timings)
})

test_that("rbind.fill performance linear with times", {
timings <- get_rbind_times(data.frame(size = 2^(1:10)),
classes=c("time"))
classes=c("time"))
expect_linear_enough(timings)
})

0 comments on commit c3dd711

Please sign in to comment.