[Rd] lsfit: Error in formatting error message

Uwe Ligges ligges at statistik.tu-dortmund.de
Mon Apr 29 11:15:34 CEST 2013


On 25.04.2013 13:29, Renaud Gaujoux wrote:
> Hi,
>
> in R-3.0 I get the following error when calling lsfit with more
> observations than variables, which seems to come from an error in the
> formatting of the error message (note that this was not happening in
> 2.15.3):
>
>> nobs <- 5; nvar <- 6; lsfit(matrix(runif(nobs*nvar), ncol=nvar),
> runif(nobs), intercept=FALSE)
> Error in sprintf(ngettext(nry, "%d response", "%d responses"), ", ",
> ngettext(ncx,  :
>    invalid format '%d'; use format %s for character objects
>> traceback()
> 3: sprintf(ngettext(nry, "%d response", "%d responses"), ", ",
> ngettext(ncx,
>         "but only %d variable", "but only %d variables"), nry, ncx)
> 2: stop(sprintf(ngettext(nry, "%d response", "%d responses"), ", ",
>         ngettext(ncx, "but only %d variable", "but only %d variables"),
>         nry, ncx), domain = NA)
> 1: lsfit(matrix(runif(nobs * nvar), ncol = nvar), runif(nobs), intercept =
> FALSE)

Thanks, fixed in R-patched and R-devel (plus the wording which was 
inappropriate for more than 10 years, at least).

Best,
Uwe Ligges




>
> Thank you.
>
> Bests,
> Renaud
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>



More information about the R-devel mailing list