Skip to content

cannot assign to NULL dimnames (PR#1042)

1 message · Brian Ripley

#
On Tue, 7 Aug 2001 htang@hpl.hp.com wrote:

            
None of the above.
Which is a correct error message.
rownames(a) <- c("a", "b")
Really?  Your own example fails in the versions I have to hand:

S-PLUS 3.4 gives
Error in dimnames(a) <- .A0: data of mode character can't be used as
dimnames
        (need a list)
In addition: Warning messages:
  Replacement length not a multiple of number of elements to replace in:
.A0[[1
        ]] <- .A1
Dumped

and S-PLUS 6.0 gives
Problem in dimnames(a) <- .A0: Invalid length (1) for dimnames attribute;
needs to be 2