From ligges at statistik.tu-dortmund.de  Mon Apr 29 11:15:34 2013
From: ligges at statistik.tu-dortmund.de (Uwe Ligges)
Date: Mon, 29 Apr 2013 11:15:34 +0200
Subject: [Rd] lsfit: Error in formatting error message
In-Reply-To: <CAHavPHEd7VWoUzP42KJ2euA1DJ7JyWxOguGHo9HtL9bBMX0Eew@mail.gmail.com>
References: <CAHavPHEd7VWoUzP42KJ2euA1DJ7JyWxOguGHo9HtL9bBMX0Eew@mail.gmail.com>
Message-ID: <517E3A36.1080409@statistik.tu-dortmund.de>

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
>



[Rd] lsfit: Error in formatting error message
Uwe Ligges