I'm indifferent about this type of behavior. I thought that the fact that it worked previously could be interpreted as "k space-separated substrings" (quoting from the ref) in the sense that the single space is the separator and thus to the left and to the right of this separator are two (=k) empty strings. But it's a matter of convention I'd say.On Wed, Mar 19, 2025 at 8:29 PM Sven Schreiber <sven.schreiber@fu-berlin.de> wrote:<hansl> matrix mtemp = ones(12) ~ seq(1,12)' # two columns cnameset(mtemp, "") # works cnameset(mtemp, " ") # works cnameset(mtemp, defarray(" "," ")) # works cnameset(mtemp, defarray("","")) # gives error: Missing string in cnameset </hansl>cnameset 1: OK, deletes any existing colnames, as per the doc cnameset 2: "works" in the sense of not actually flagging an error, but that's a bug: the single string argument is just a space, but is not "empty", and so it should fail. It now does in git.
cnameset 3: sets single-space colnames. Weird, but if that's what you want... cnameset 4: should not fail, but delete existing colnames. It now does in git.
OK great, thanks!
BTW, I transformed your testing code to use rnameset() on the transpose of the test matrix. It choked on the two lines:
rnameset(m, defarray("one", "", "two", ""))
rnameset(m, defarray("","","",""))
But this is an older snapshot, so maybe you also fixed rnameset already, in parallel to cnameset.
cheers
sven