Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Bug: aaply on empty matrix #88

Closed
pengyu opened this Issue Jul 11, 2012 · 0 comments

Comments

Projects
None yet
2 participants

pengyu commented Jul 11, 2012

See the last command for the bug.

> aaply(matrix(1:6, nrow=2), 1, cumsum, .drop=F)

X1  1 2  3
  1 1 4  9
  2 2 6 12
> aaply(matrix(1:2, nrow=2), 1, cumsum, .drop=F)

X1  1
  1 1
  2 2
> matrix(numeric(), nrow=2)

[1,]
[2,]
> aaply(matrix(numeric(), nrow=2), 1, cumsum, .drop=F)
Error: Results must have one or more dimensions.
Execution halted

@hadley hadley closed this in a3bcf94 Oct 8, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment