[Rd] arithmetic with zero-column data.frames

William Dunlap wdunlap at tibco.com
Tue Aug 8 20:59:45 CEST 2017


Should arithmetic operations work on zero-column data.frames (returning a
zero-column data.frame with the same number of rows as the data.frame
argument(s))?   Currently we get:

> 1 + data.frame(row.names=c("A","B"))
Error in data.frame(value, row.names = rn, check.names = FALSE, check.rows
= FALSE) :
  row names supplied are of the wrong length
> data.frame(row.names=c("A","B")) * 2
Error in data.frame(value, row.names = rn, check.names = FALSE, check.rows
= FALSE) :
  row names supplied are of the wrong length
> data.frame(row.names=c("A","B")) / data.frame(row.names=c("A","B"))
Error in data.frame(value, row.names = rn, check.names = FALSE, check.rows
= FALSE) :
  row names supplied are of the wrong length

Bill Dunlap
TIBCO Software
wdunlap tibco.com

	[[alternative HTML version deleted]]



More information about the R-devel mailing list