The R Project SVN R

Rev

Rev 63096 | Rev 63181 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 63096 Rev 63155
Line 441... Line 441...
441
		 SEXP rl, SEXP cl, const char *rn, const char *cn)
441
		 SEXP rl, SEXP cl, const char *rn, const char *cn)
442
{
442
{
443
/* 'rl' and 'cl' are dimnames(.)[[1]] and dimnames(.)[[2]]  whereas
443
/* 'rl' and 'cl' are dimnames(.)[[1]] and dimnames(.)[[2]]  whereas
444
 * 'rn' and 'cn' are the  names(dimnames(.))
444
 * 'rn' and 'cn' are the  names(dimnames(.))
445
 */
445
 */
-
 
446
    const void *vmax = vmaxget();
446
    int r = INTEGER(dim)[0];
447
    int r = INTEGER(dim)[0];
447
    int c = INTEGER(dim)[1], r_pr;
448
    int c = INTEGER(dim)[1], r_pr;
448
    /* PR#850 */
449
    /* PR#850 */
449
    if ((rl != R_NilValue) && (r > length(rl)))
450
    if ((rl != R_NilValue) && (r > length(rl)))
450
	error(_("too few row labels"));
451
	error(_("too few row labels"));
Line 490... Line 491...
490
#else
491
#else
491
    if(r_pr < r) 
492
    if(r_pr < r) 
492
	Rprintf(" [ reached getOption(\"max.print\") -- omitted %d rows ]\n",
493
	Rprintf(" [ reached getOption(\"max.print\") -- omitted %d rows ]\n",
493
		r - r_pr);
494
		r - r_pr);
494
#endif
495
#endif
-
 
496
    vmaxset(vmax);
495
}
497
}
496
 
498
 
497
attribute_hidden
499
attribute_hidden
498
void printArray(SEXP x, SEXP dim, int quote, int right, SEXP dimnames)
500
void printArray(SEXP x, SEXP dim, int quote, int right, SEXP dimnames)
499
{
501
{
500
/* == printArray(.) */
502
/* == printArray(.) */
501
 
-
 
-
 
503
    const void *vmax = vmaxget();
502
    int ndim = LENGTH(dim);
504
    int ndim = LENGTH(dim);
503
    const char *rn = NULL, *cn = NULL;
505
    const char *rn = NULL, *cn = NULL;
504
 
506
 
505
    if (ndim == 1)
507
    if (ndim == 1)
506
	printVector(x, 1, quote);
508
	printVector(x, 1, quote);
Line 602... Line 604...
602
	    Rprintf(" [ reached getOption(\"max.print\") -- omitted");
604
	    Rprintf(" [ reached getOption(\"max.print\") -- omitted");
603
	    if(nr_last < nr) Rprintf(" %d row(s) and", nr - nr_last);
605
	    if(nr_last < nr) Rprintf(" %d row(s) and", nr - nr_last);
604
	    Rprintf(" %d matrix slice(s) ]\n", nb - nb_pr);
606
	    Rprintf(" %d matrix slice(s) ]\n", nb - nb_pr);
605
	}
607
	}
606
    }
608
    }
-
 
609
    vmaxset(vmax);
607
}
610
}
608
 
611