[Rd] Suggestion: Slightly Clearer Error Message

ivo welch ivowel at gmail.com
Sat Mar 25 15:17:43 CET 2006


dear R developers:

May I suggest that you enhance the error message:

Error in "[<-"(`*tmp*`, , curcol, value = c(0.0198881080712288,
0.00889721376726782,  :
	number of items to replace is not a multiple of replacement length

with information about why this is the case?  For example,

	number of items to replace (dimensions: x,y,z) is not a multiple of
replacement length (dimension x,y)

I just spent some time to figure out that a row-vector was not a
col-vector in context here.  in fact, this may warrant a special note
("you cannot replace a col-vector of length x with a row-vector of
length y").

just a suggestion...

regards,

/iaw



More information about the R-devel mailing list