The R Project SVN R

Rev

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

Rev 21054 Rev 22974
Line 1... Line 1...
1
/*
1
/*
2
 *  R : A Computer Language for Statistical Data Analysis
2
 *  R : A Computer Language for Statistical Data Analysis
3
 *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
3
 *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
4
 *  Copyright (C) 1997--2001  Robert Gentleman, Ross Ihaka and the
4
 *  Copyright (C) 1997--2003  Robert Gentleman, Ross Ihaka and the
5
 *			      R Development Core Team
5
 *			      R Development Core Team
6
 *
6
 *
7
 *  This program is free software; you can redistribute it and/or modify
7
 *  This program is free software; you can redistribute it and/or modify
8
 *  it under the terms of the GNU General Public License as published by
8
 *  it under the terms of the GNU General Public License as published by
9
 *  the Free Software Foundation; either version 2 of the License, or
9
 *  the Free Software Foundation; either version 2 of the License, or
Line 3734... Line 3734...
3734
	vmaxset(vmax);
3734
	vmaxset(vmax);
3735
	break;
3735
	break;
3736
    case 5: /* thermometers */
3736
    case 5: /* thermometers */
3737
	if (nc != 3 && nc != 4)
3737
	if (nc != 3 && nc != 4)
3738
	    errorcall(call, "invalid thermometers data (need 3 or 4 columns)");
3738
	    errorcall(call, "invalid thermometers data (need 3 or 4 columns)");
3739
	SymbolRange(REAL(p)+2*nr/* <-- pointer arith*/, 2 * nr, &pmax, &pmin);
3739
	SymbolRange(REAL(p)+2*nr/* <-- pointer arith*/, nr, &pmax, &pmin);
3740
	if (pmax < pmin)
3740
	if (pmax < pmin)
3741
	    errorcall(call, "invalid thermometers[,%s]",(nc == 4)? "3:4" : "3");
3741
	    errorcall(call, "invalid thermometers[,%s]",(nc == 4)? "3:4" : "3");
3742
	if (pmin < 0. || pmax > 1.) /* S-PLUS has an error here */
3742
	if (pmin < 0. || pmax > 1.) /* S-PLUS has an error here */
3743
	    warningcall(call,"thermometers[,%s] not in [0,1] -- may look funny",
3743
	    warningcall(call,"thermometers[,%s] not in [0,1] -- may look funny",
3744
			(nc == 4)? "3:4" : "3");
3744
			(nc == 4)? "3:4" : "3");