| 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) 1998-2001 The R Development Core Team
|
4 |
* Copyright (C) 1998-2001 The R Development Core Team
|
| 5 |
* Copyright (C) 2002--2004 The R Foundation
|
5 |
* Copyright (C) 2002--2005 The R Foundation
|
| 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
|
| 10 |
* (at your option) any later version.
|
10 |
* (at your option) any later version.
|
| Line 1022... |
Line 1022... |
| 1022 |
checkArity(op, args);
|
1022 |
checkArity(op, args);
|
| 1023 |
x = CAR(args); args = CDR(args);
|
1023 |
x = CAR(args); args = CDR(args);
|
| 1024 |
n = asInteger(CAR(args)); args = CDR(args);
|
1024 |
n = asInteger(CAR(args)); args = CDR(args);
|
| 1025 |
p = asInteger(CAR(args)); args = CDR(args);
|
1025 |
p = asInteger(CAR(args)); args = CDR(args);
|
| 1026 |
NaRm = asLogical(CAR(args));
|
1026 |
NaRm = asLogical(CAR(args));
|
| 1027 |
if (n == NA_INTEGER || n <= 0)
|
1027 |
if (n == NA_INTEGER || n < 0)
|
| 1028 |
errorcall(call, _("invalid value of 'n'"));
|
1028 |
errorcall(call, _("invalid value of 'n'"));
|
| 1029 |
if (p == NA_INTEGER || p <= 0)
|
1029 |
if (p == NA_INTEGER || p < 0)
|
| 1030 |
errorcall(call, _("invalid value of 'p'"));
|
1030 |
errorcall(call, _("invalid value of 'p'"));
|
| 1031 |
if (NaRm == NA_LOGICAL) errorcall(call, _("invalid value of 'na.rm'"));
|
1031 |
if (NaRm == NA_LOGICAL) errorcall(call, _("invalid value of 'na.rm'"));
|
| 1032 |
keepNA = !NaRm;
|
1032 |
keepNA = !NaRm;
|
| 1033 |
|
1033 |
|
| 1034 |
OP = PRIMVAL(op);
|
1034 |
OP = PRIMVAL(op);
|