Yes, even if I only run the command matrix(0,30,10) I get the error. I am
running R with Ubuntu 10.10 (maverick) with R version:

R version 2.13.1 (2011-07-08)


When I check the function matrix, I can see that it is only passing five
arguments to the function .Internal() (shown below).

function (data = NA, nrow = 1, ncol = 1, byrow = FALSE, dimnames = NULL)
{
    data <- as.vector(data)
    if (missing(nrow))
        nrow <- ceiling(length(data)/ncol)
    else if (missing(ncol))
        ncol <- ceiling(length(data)/nrow)
    .Internal(matrix(data, nrow, ncol, byrow, dimnames))
}
<environment: namespace:base>



On Mon, Aug 1, 2011 at 1:02 PM, Jean V Adams <jvadams@usgs.gov> wrote:

>
> Robert,
>
> What code did you run to get that error?
>
> Do you get the error if the only code that you run is ...
>      matrix(0, 30, 10)
>
> You gave three arguments to matrix, which requires none, but can take up to
> five.
> In the function matrix there is a call to .Internal(matrix) which requires
> 7 arguments.
> See ...
>      matrix
>
> Jean
>
>
> `·.,,  ><(((º>   `·.,,  ><(((º>   `·.,,  ><(((º>
>
> Jean V. Adams
> Statistician
> U.S. Geological Survey
> Great Lakes Science Center
> 223 East Steinfest Road
> Antigo, WI 54409  USA
>
>
>
>
>  From: Robert Pfister <rwp7h@virginia.edu> To: r-help@r-project.org Date: 08/01/2011
> 11:56 AM Subject: [R]  5 arguments passed to .Internal(matrix) which
> requires 7 Sent by: r-help-bounces@r-project.org
> ------------------------------
>
>
>
> Hello,
>
> I am having a problem with the function matrix. Specifically, when I pass
> three arguments (two more being instantiated in the function), I get the
> following error message:
>
> Error in matrix(0, 30, 10) :
>  5 arguments passed to .Internal(matrix) which requires 7
>
>
> I looked into it, and someone has suggested that this may be the function
> from an old version of R. I recently changed my source path from the lucid
> version to the maverick version and installed all of the R packages I need
> like so, but why would this change the matrix() function? Also, how does R
> know that I passed five arguments (only three being given) if the matrix()
> function is supposed to take seven arguments?
>
> Thank you,
>
> Robert
>
>                 [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html>
> and provide commented, minimal, self-contained, reproducible code.
>
>
>

	[[alternative HTML version deleted]]

