On Tue, 14 Mar 2017, Sven Schreiber wrote:
Hi,
is this failure expected or/and a bug?:
<hansl>
matrix m = I(2)
strings ms = defarray("a", "b")
colnames(m, ms) # works
print m
colnames(m, defarray("a", "b")) # fails
print m
</hansl>
I wouldn't really say it's a bug. As things stand defarray() needs a
type specification, so we know what sort of array the user wants and
can check the putative elements for type-correctness.
In principle, I suppose that if we didn't get a type specification in
advance we could evaluate all the putative members and if they're all
of the same (acceptable) type, set the array type afterwards.
Allin