| 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, 1997 Robert Gentleman and Ross Ihaka
|
3 |
* Copyright (C) 1995, 1996, 1997 Robert Gentleman and Ross Ihaka
|
| 4 |
* Copyright (C) 1998--2003 The R Development Core Team.
|
4 |
* Copyright (C) 1998--2003 The R Development Core Team.
|
| - |
|
5 |
* Copyright (C) 2003 The R Foundation
|
| 5 |
*
|
6 |
*
|
| 6 |
* 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
|
| 7 |
* 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
|
| 8 |
* the Free Software Foundation; either version 2 of the License, or
|
9 |
* the Free Software Foundation; either version 2 of the License, or
|
| 9 |
* (at your option) any later version.
|
10 |
* (at your option) any later version.
|
| Line 11... |
Line 12... |
| 11 |
* This program is distributed in the hope that it will be useful,
|
12 |
* This program is distributed in the hope that it will be useful,
|
| 12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 14 |
* GNU General Public License for more details.
|
15 |
* GNU General Public License for more details.
|
| 15 |
*
|
16 |
*
|
| 16 |
* You should have received a copy of the GNU General Public License
|
17 |
* A copy of the GNU General Public License is available via WWW at
|
| - |
|
18 |
* http://www.gnu.org/copyleft/gpl.html. You can also obtain it by
|
| 17 |
* along with this program; if not, write to the Free Software
|
19 |
* writing to the Free Software Foundation, Inc., 59 Temple Place,
|
| 18 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
20 |
* Suite 330, Boston, MA 02111-1307 USA.
|
| 19 |
*/
|
21 |
*/
|
| 20 |
|
22 |
|
| 21 |
#ifdef HAVE_CONFIG_H
|
23 |
#ifdef HAVE_CONFIG_H
|
| 22 |
#include <config.h>
|
24 |
#include <config.h>
|
| 23 |
#endif
|
25 |
#endif
|
| Line 1066... |
Line 1068... |
| 1066 |
int naflag;
|
1068 |
int naflag;
|
| 1067 |
|
1069 |
|
| 1068 |
if (!isNumeric(sa) || !isNumeric(sb))
|
1070 |
if (!isNumeric(sa) || !isNumeric(sb))
|
| 1069 |
errorcall(lcall, R_MSG_NONNUM_MATH);
|
1071 |
errorcall(lcall, R_MSG_NONNUM_MATH);
|
| 1070 |
|
1072 |
|
| 1071 |
/* for 0-length a we want the attributes of a, not those of b
|
1073 |
/* for 0-length a we want the attributes of a, not those of b
|
| 1072 |
as no recycling will occur */
|
1074 |
as no recycling will occur */
|
| 1073 |
#define SETUP_Math2 \
|
1075 |
#define SETUP_Math2 \
|
| 1074 |
na = LENGTH(sa); \
|
1076 |
na = LENGTH(sa); \
|
| 1075 |
nb = LENGTH(sb); \
|
1077 |
nb = LENGTH(sb); \
|
| 1076 |
if ((na == 0) || (nb == 0)) { \
|
1078 |
if ((na == 0) || (nb == 0)) { \
|