The R Project SVN R

Rev

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

Rev 4593 Rev 4619
Line -... Line 1...
-
 
1
 
1
/*
2
/*
2
 *  R : A Computer Language for Statistical Data Analysis
3
 *  R : A Computer Language for Statistical Data Analysis
3
 *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
4
 *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
4
 *  Copyright (C) 1997--1999  Robert Gentleman, Ross Ihaka and the
5
 *  Copyright (C) 1997--1999  Robert Gentleman, Ross Ihaka and the
5
 *                            R Development Core Team
6
 *                            R Development Core Team
Line 465... Line 466...
465
{
466
{
466
    SEXP ans = R_NilValue;/* -Wall*/
467
    SEXP ans = R_NilValue;/* -Wall*/
467
    int save_digits, i, n, w, d, e, wi, di, ei;
468
    int save_digits, i, n, w, d, e, wi, di, ei;
468
    char *strp;
469
    char *strp;
469
    n = length(labels);
470
    n = length(labels);
470
    save_digits = print_digits;
471
    save_digits = R_print.digits;
471
    print_digits = 7;
472
    R_print.digits = 7;
472
    switch(TYPEOF(labels)) {
473
    switch(TYPEOF(labels)) {
473
    case LGLSXP:
474
    case LGLSXP:
474
	PROTECT(ans = allocVector(STRSXP, n));
475
	PROTECT(ans = allocVector(STRSXP, n));
475
	for (i = 0; i < n; i++) {
476
	for (i = 0; i < n; i++) {
476
	    strp = EncodeLogical(LOGICAL(labels)[i], 0);
477
	    strp = EncodeLogical(LOGICAL(labels)[i], 0);