| 7727 |
ripley |
1 |
/*
|
|
|
2 |
* R : A Computer Language for Statistical Data Analysis
|
| 20094 |
ripley |
3 |
* Copyright (C) 1998-2002 Robert Gentleman, Ross Ihaka
|
| 7727 |
ripley |
4 |
* and the R Development Core Team
|
|
|
5 |
*
|
|
|
6 |
* This program is free software; you can redistribute it and/or modify
|
| 12778 |
pd |
7 |
* it under the terms of the GNU Lesser General Public License as published by
|
|
|
8 |
* the Free Software Foundation; either version 2.1 of the License, or
|
| 7727 |
ripley |
9 |
* (at your option) any later version.
|
|
|
10 |
*
|
|
|
11 |
* This program is distributed in the hope that it will be useful,
|
|
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 12778 |
pd |
14 |
* GNU Lesser General Public License for more details.
|
| 7727 |
ripley |
15 |
*
|
| 12778 |
pd |
16 |
* You should have received a copy of the GNU Lesser General Public License
|
| 7727 |
ripley |
17 |
* along with this program; if not, write to the Free Software
|
|
|
18 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
19 |
*/
|
|
|
20 |
|
|
|
21 |
/*
|
|
|
22 |
* Generally useful print utilities *NOT* relying on R internals (from Defn.h)
|
|
|
23 |
*
|
|
|
24 |
* (not useful anymore; use R_print struct with SEXP) --> Print.h
|
|
|
25 |
*/
|
|
|
26 |
#ifndef PRTUTIL_H_
|
|
|
27 |
#define PRTUTIL_H_
|
|
|
28 |
|
| 19500 |
hornik |
29 |
#include <R_ext/Complex.h>
|
|
|
30 |
#include <R_ext/Print.h>
|
| 7727 |
ripley |
31 |
|
| 7754 |
ripley |
32 |
#define formatLogical Rf_formatLogical
|
|
|
33 |
#define formatInteger Rf_formatInteger
|
|
|
34 |
#define formatReal Rf_formatReal
|
|
|
35 |
#define formatComplex Rf_formatComplex
|
|
|
36 |
#define EncodeLogical Rf_EncodeLogical
|
|
|
37 |
#define EncodeInteger Rf_EncodeInteger
|
|
|
38 |
#define EncodeReal Rf_EncodeReal
|
|
|
39 |
#define EncodeComplex Rf_EncodeComplex
|
|
|
40 |
#define EncodeString Rf_EncodeString
|
|
|
41 |
#define VectorIndex Rf_VectorIndex
|
|
|
42 |
#define printIntegerVector Rf_printIntegerVector
|
|
|
43 |
#define printRealVector Rf_printRealVector
|
|
|
44 |
#define printComplexVector Rf_printComplexVector
|
|
|
45 |
|
| 8552 |
maechler |
46 |
#define Rprt_adj_right 1
|
|
|
47 |
#define Rprt_adj_left 0
|
| 7727 |
ripley |
48 |
|
| 11211 |
ripley |
49 |
#ifdef __cplusplus
|
|
|
50 |
extern "C" {
|
|
|
51 |
#endif
|
|
|
52 |
|
| 7727 |
ripley |
53 |
/* Computation of printing formats */
|
|
|
54 |
void formatLogical(int*,int,int*);
|
|
|
55 |
void formatInteger(int*,int,int*);
|
| 14357 |
ripley |
56 |
void formatReal(double*, int, int*, int*, int*, int);
|
|
|
57 |
void formatComplex(Rcomplex*, int, int*, int*, int*, int*, int*, int*, int);
|
| 7727 |
ripley |
58 |
|
|
|
59 |
/* Formating of values */
|
|
|
60 |
char *EncodeLogical(int, int);
|
|
|
61 |
char *EncodeInteger(int, int);
|
|
|
62 |
char *EncodeReal(double, int, int, int);
|
|
|
63 |
char *EncodeComplex(Rcomplex, int, int, int, int, int, int);
|
|
|
64 |
char *EncodeString(char*, int, int, int);
|
|
|
65 |
|
|
|
66 |
/* Printing */
|
|
|
67 |
void VectorIndex(int, int);
|
|
|
68 |
|
| 10881 |
maechler |
69 |
void printLogicalVector(int *x, int n, int indx);
|
|
|
70 |
void printIntegerVector(int *x, int n, int indx);
|
|
|
71 |
void printRealVector (double *x, int n, int indx);
|
|
|
72 |
void printComplexVector(Rcomplex *x,int n, int indx);
|
| 7727 |
ripley |
73 |
|
|
|
74 |
char *Rsprintf(char*, ...);
|
| 11211 |
ripley |
75 |
#ifdef __cplusplus
|
|
|
76 |
}
|
|
|
77 |
#endif
|
| 7727 |
ripley |
78 |
|
| 11211 |
ripley |
79 |
#endif /* PRTUTIL_H_ */
|