Concatenation seems to work properly if you put the madness object first, but not second. Minimum working example:
> x = c(1,2,3)
> xmad = madness(x)
Warning message:
In madness(x) : no dimension given, turning val into a column
> x2 = c(0,xmad)
> x3 = c(xmad,0)
> #this one works
> x3
class: madness
d rbind(x,numeric)
calc: --------------------
d x
val: 1 ...
dvdx: 1 0 0 ...
varx: ...
> x2
[[1]]
[1] 0
[[2]]
class: madness
d x
calc: -----
d x
val: 1 ...
dvdx: 1 0 0 ...
varx: ...
Heeding the warning message and forcing x to be a column or a row matrix does not fix the problem.
Concatenation seems to work properly if you put the madness object first, but not second. Minimum working example:
Heeding the warning message and forcing x to be a column or a row matrix does not fix the problem.