Native API stats of R.h
From R Consortium Wiki
Revision as of 15:20, 20 June 2016 by Lukasstadler (Talk | contribs)
Input
#include "R.h"
Result
#define Calloc(n, t) (t *) R_chk_calloc( (size_t) (n), sizeof(t) ) // Calloc used 5657 times in 240 packages
#define CallocCharBuf(n) (char *) R_chk_calloc((size_t) ((n)+1), sizeof(char)) // CallocCharBuf used 3 times in cplexAPI, patchDVI
#define DOUBLE_DIGITS 53 // DOUBLE_DIGITS used 42 times in evd
#define DOUBLE_EPS 2.2204460492503131e-16 // DOUBLE_EPS used 180 times in 40 packages
#define DOUBLE_XMAX 1.7976931348623157e+308 // DOUBLE_XMAX used 63 times in 13 packages
#define DOUBLE_XMIN 2.2250738585072014e-308 // DOUBLE_XMIN used 13 times in unmarked, deSolve, ifultools, spatstat
#define ENABLE_NLS 1 // ENABLE_NLS used 80 times in 59 packages
#define ERROR <defined> // ERROR used 6406 times in 293 packages
#define F77_CALL(x) x_ // F77_CALL used 4269 times in 195 packages
#define F77_COM(x) x_ // F77_COM used 2 times in igraph
#define F77_COMDECL(x) x_ // F77_COMDECL used 2 times in igraph
#define F77_NAME(x) x_ // F77_NAME used 1913 times in 117 packages
#define F77_SUB(x) x_ // F77_SUB used 771 times in 89 packages
#define Free(p) (R_chk_free( (void *)(p) ), (p) = __null) // Free used 21329 times in 683 packages
#define HAVE_ALLOCA_H 1 // HAVE_ALLOCA_H used 15 times in treatSens, Matrix, TMB, pbdZMQ, ore, dbarts
#define HAVE_AQUA 1 // HAVE_AQUA used 13 times in 11 packages
#define HAVE_F77_UNDERSCORE 1 // HAVE_F77_UNDERSCORE used 2 times in igraph
#define IEEE_754 1 // IEEE_754 used 47 times in igraph, Rcpp, data.table, stringi
#define ISNA(x) R_IsNA(x) // ISNA used 649 times in 100 packages
#define ISNAN(x) R_isnancpp(x) // ISNAN used 1342 times in 146 packages
#define IndexWidth Rf_IndexWidth // IndexWidth unused
#define LOCAL_EVALUATOR // LOCAL_EVALUATOR used 11 times in rggobi, XML, ifultools, RGtk2
#define LibExport // LibExport used 2 times in hsmm
#define LibExtern extern // LibExtern used 4 times in rJava
#define LibImport // LibImport unused
#define MESSAGE <defined> // MESSAGE used 172 times in 33 packages
#define M_1_PI 0.318309886183790671537767526745028724 // M_1_PI used 42 times in SpatialExtremes, decon, mvabund, geoR, geoRglm, ExomeDepth, libamtrack, miRada, RandomFields, DescTools
#define M_2_PI 0.636619772367581343075535053490057448 // M_2_PI used 27 times in RandomFieldsUtils, dynaTree, ExomeDepth, RandomFields, svd, DescTools, spatstat
#define M_2_SQRTPI 1.12837916709551257389615890312154517 // M_2_SQRTPI used 6 times in excursions, PearsonDS, SpecsVerification, ExomeDepth
#define M_E 2.71828182845904523536028747135266250 // M_E used 40 times in Runuran, lamW, gmum.r, ExomeDepth, CEC, PoweR, TMB, Bmix, tgp, RcppShark
#define M_LN10 2.30258509299404568401799145468436421 // M_LN10 used 27 times in monomvn, rphast, secr, Runuran, rtfbs, PlayerRatings, ExomeDepth, spaMM, logistf, laGP
#define M_LN2 0.693147180559945309417232121458176568 // M_LN2 used 166 times in 30 packages
#define M_LOG10E 0.434294481903251827651128918916605082 // M_LOG10E used 2 times in ExomeDepth
#define M_LOG2E 1.44269504088896340735992468100189214 // M_LOG2E used 2 times in ExomeDepth
#define M_PI 3.14159265358979323846264338327950288 // M_PI used 1853 times in 207 packages
#define M_PI_2 1.57079632679489661923132169163975144 // M_PI_2 used 149 times in 28 packages
#define M_PI_4 0.785398163397448309615660845819875721 // M_PI_4 used 18 times in 12 packages
#define M_SQRT1_2 0.707106781186547524400844362104849039 // M_SQRT1_2 used 26 times in SpatialExtremes, gmwm, excursions, forecast, subrank, dplR, ExomeDepth, SpecsVerification
#define M_SQRT2 1.41421356237309504880168872420969808 // M_SQRT2 used 72 times in 23 packages
#define Memcpy(p,q,n) memcpy( p, q, (size_t)(n) * sizeof(*p) ) // Memcpy used 483 times in 32 packages
#define Memzero(p,n) memset(p, 0, (size_t)(n) * sizeof(*p)) // Memzero used 5 times in Matrix
#define NA_INTEGER R_NaInt // NA_INTEGER used 1520 times in 183 packages
#define NA_LOGICAL R_NaInt // NA_LOGICAL used 355 times in 73 packages
#define NA_REAL R_NaReal // NA_REAL used 1667 times in 226 packages
#define NORET __attribute__((noreturn)) // NORET unused
#define NULL_ENTRY // NULL_ENTRY used 170 times in 12 packages
#define PI 3.14159265358979323846264338327950288 // PI unused
#define PROBLEM <defined> // PROBLEM used 861 times in 78 packages
#define RECOVER <defined> // RECOVER used 170 times in 14 packages
#define R_ARITH_H_ // R_ARITH_H_ unused
#define R_COMPLEX_H // R_COMPLEX_H used 1 times in uniqueAtomMat
#define R_Calloc(n, t) (t *) R_chk_calloc( (size_t) (n), sizeof(t) ) // R_Calloc used 81 times in clpAPI, cplexAPI, poppr, rLindo, glpkAPI
#define R_ERROR_H_ // R_ERROR_H_ unused
#define R_EXT_BOOLEAN_H_ // R_EXT_BOOLEAN_H_ used 2 times in jpeg, Rcpp11
#define R_EXT_CONSTANTS_H_ // R_EXT_CONSTANTS_H_ unused
#define R_EXT_MEMORY_H_ // R_EXT_MEMORY_H_ unused
#define R_EXT_PRINT_H_ // R_EXT_PRINT_H_ used 6 times in spTDyn, spTimer
#define R_EXT_UTILS_H_ // R_EXT_UTILS_H_ unused
#define R_FINITE(x) R_finite(x) // R_FINITE used 1387 times in 145 packages
#define R_Free(p) (R_chk_free( (void *)(p) ), (p) = __null) // R_Free used 78 times in clpAPI, cplexAPI, poppr, glpkAPI
#define R_INLINE inline // R_INLINE used 330 times in 34 packages
#define R_PROBLEM_BUFSIZE 4096 // R_PROBLEM_BUFSIZE unused
#define R_RANDOM_H // R_RANDOM_H unused
#define R_RCONFIG_H // R_RCONFIG_H unused
#define R_RS_H // R_RS_H unused
#define R_R_H // R_R_H used 9 times in TMB, uniqueAtomMat, DatABEL, GenABEL, VariABEL
#define R_Realloc(p,n,t) (t *) R_chk_realloc( (void *)(p), (size_t)((n) * sizeof(t)) ) // R_Realloc used 3 times in poppr, seqminer, gpuR
#define Realloc(p,n,t) (t *) R_chk_realloc( (void *)(p), (size_t)((n) * sizeof(t)) ) // Realloc used 244 times in 57 packages
#define SINGLE_BASE 2 // SINGLE_BASE unused
#define SINGLE_EPS 1.19209290e-7F // SINGLE_EPS unused
#define SINGLE_XMAX 3.40282347e+38F // SINGLE_XMAX used 4 times in mapproj
#define SINGLE_XMIN 1.17549435e-38F // SINGLE_XMIN unused
#define SINT_MAX 2147483647 // SINT_MAX used 4 times in robust, AnalyzeFMRI
#define SINT_MIN (-2147483647 -1) // SINT_MIN used 2 times in robust
#define SIZEOF_SIZE_T 8 // SIZEOF_SIZE_T used 1 times in PythonInR
#define SUPPORT_MBCS 1 // SUPPORT_MBCS used 1 times in bibtex
#define SUPPORT_UTF8 1 // SUPPORT_UTF8 used 3 times in tau, rindex, stringi
#define StringFalse Rf_StringFalse // StringFalse used 3 times in iotools
#define StringTrue Rf_StringTrue // StringTrue used 3 times in iotools
#define USING_R // USING_R used 238 times in 29 packages
#define WARN <defined> // WARN used 122 times in 20 packages
#define WARNING <defined> // WARNING used 957 times in 190 packages
#define cPsort Rf_cPsort // cPsort unused
#define error Rf_error // error used 63771 times in 1109 packages
#define iPsort Rf_iPsort // iPsort used 3 times in matrixStats, robustbase
#define isBlankString Rf_isBlankString // isBlankString used 1 times in iotools
#define rPsort Rf_rPsort // rPsort used 63 times in 15 packages
#define revsort Rf_revsort // revsort used 60 times in 20 packages
#define setIVector Rf_setIVector // setIVector unused
#define setRVector Rf_setRVector // setRVector used 3 times in RcppClassic, RcppClassicExamples
#define warning Rf_warning // warning used 7679 times in 434 packages
# /Users/ls/Source/git/fastr/com.oracle.truffle.r.native/include/R.h
typedef double Sfloat; // Sfloat used 440 times in AnalyzeFMRI, wavethresh, IGM.MEA, spatial, LS2W, robust, MASS, PBSmapping
typedef int Sint; // Sint used 2750 times in 48 packages
extern "C" {
void R_FlushConsole(void); // R_FlushConsole used 651 times in 78 packages
void R_ProcessEvents(void); // R_ProcessEvents used 275 times in 39 packages
}
# /Users/ls/Source/git/fastr/com.oracle.truffle.r.native/include/R_ext/Arith.h
extern "C" {
extern double R_NaN; // R_NaN used 469 times in 68 packages
extern double R_PosInf; // R_PosInf used 562 times in 112 packages
extern double R_NegInf; // R_NegInf used 699 times in 105 packages
extern double R_NaReal; // R_NaReal used 140 times in 34 packages
// NA_REAL used 1667 times in 226 packages
extern int R_NaInt; // R_NaInt used 58 times in 20 packages
// NA_INTEGER used 1520 times in 183 packages
// NA_LOGICAL used 355 times in 73 packages
int R_IsNA(double); // R_IsNA used 161 times in 40 packages
int R_IsNaN(double); // R_IsNaN used 75 times in 28 packages
int R_finite(double); // R_finite used 232 times in 44 packages
int R_isnancpp(double); // R_isnancpp used 8 times in igraph, PwrGSD
}
# /Users/ls/Source/git/fastr/com.oracle.truffle.r.native/include/R_ext/Boolean.h
extern "C" {
typedef enum { FALSE = 0, TRUE } Rboolean;
}
# /Users/ls/Source/git/fastr/com.oracle.truffle.r.native/include/R_ext/Complex.h
extern "C" {
typedef struct {
double r;
double i;
} Rcomplex; // Rcomplex used 893 times in 47 packages
}
# /Users/ls/Source/git/fastr/com.oracle.truffle.r.native/include/R_ext/Error.h
extern "C" {
void __attribute__((noreturn)) Rf_error(const char *, ...);
void __attribute__((noreturn)) UNIMPLEMENTED(const char *);
void __attribute__((noreturn)) WrongArgCount(const char *);
void Rf_warning(const char *, ...); // Rf_warning used 316 times in 66 packages
// warning used 7679 times in 434 packages
void R_ShowMessage(const char *s); // R_ShowMessage used 104 times in Rserve, rJava, HiPLARM
}
# /Users/ls/Source/git/fastr/com.oracle.truffle.r.native/include/R_ext/Memory.h
extern "C" {
void* vmaxget(void); // vmaxget used 279 times in 20 packages
void vmaxset(const void *); // vmaxset used 279 times in 20 packages
void R_gc(void); // R_gc used 6 times in TMB, excel.link, gmatrix, microbenchmark
int R_gc_running(); // R_gc_running unused
char* R_alloc(size_t, int); // R_alloc used 7787 times in 330 packages
long double *R_allocLD(size_t nelem);
char* S_alloc(long, int); // S_alloc used 540 times in 50 packages
char* S_realloc(char *, long, long, int); // S_realloc used 55 times in 11 packages
}
# /Users/ls/Source/git/fastr/com.oracle.truffle.r.native/include/R_ext/Print.h
extern "C" {
void Rprintf(const char *, ...); // Rprintf used 33813 times in 729 packages
void REprintf(const char *, ...); // REprintf used 2531 times in 135 packages
}
# /Users/ls/Source/git/fastr/com.oracle.truffle.r.native/include/R_ext/RS.h
extern "C" {
extern void *R_chk_calloc(size_t, size_t); // R_chk_calloc used 6 times in rpart, XML, itree, ifultools, mgcv
extern void *R_chk_realloc(void *, size_t); // R_chk_realloc used 5 times in seqminer, gpuR, ifultools, mgcv
extern void R_chk_free(void *); // R_chk_free used 2 times in mgcv
void call_R(char*, long, void**, char**, long*, char**, long, char**); // call_R used 2 times in PoweR
}
# /Users/ls/Source/git/fastr/com.oracle.truffle.r.native/include/R_ext/Random.h
extern "C" {
typedef enum {
WICHMANN_HILL,
MARSAGLIA_MULTICARRY,
SUPER_DUPER,
MERSENNE_TWISTER,
KNUTH_TAOCP,
USER_UNIF,
KNUTH_TAOCP2,
LECUYER_CMRG
} RNGtype; // RNGtype unused
typedef enum {
BUGGY_KINDERMAN_RAMAGE,
AHRENS_DIETER,
BOX_MULLER,
USER_NORM,
INVERSION,
KINDERMAN_RAMAGE
} N01type; // N01type unused
void GetRNGstate(void); // GetRNGstate used 1753 times in 434 packages
void PutRNGstate(void); // PutRNGstate used 1794 times in 427 packages
double unif_rand(void); // unif_rand used 2135 times in 327 packages
double norm_rand(void); // norm_rand used 408 times in 93 packages
double exp_rand(void); // exp_rand used 110 times in 25 packages
typedef unsigned int Int32;
double * user_unif_rand(void); // user_unif_rand used 10 times in randaes, rstream, rngwell19937, SuppDists, randtoolbox, rlecuyer, Rrdrand
void user_unif_init(Int32); // user_unif_init used 5 times in randaes, SuppDists, randtoolbox, rngwell19937
int * user_unif_nseed(void); // user_unif_nseed used 4 times in randaes, SuppDists, rngwell19937
int * user_unif_seedloc(void); // user_unif_seedloc used 4 times in randaes, SuppDists, rngwell19937
double * user_norm_rand(void); // user_norm_rand used 1 times in RcppZiggurat
}
# /Users/ls/Source/git/fastr/com.oracle.truffle.r.native/include/R_ext/Utils.h
extern "C" {
void R_isort(int*, int); // R_isort used 45 times in 18 packages
void R_rsort(double*, int); // R_rsort used 210 times in 29 packages
void R_csort(Rcomplex*, int); // R_csort unused
void rsort_with_index(double *, int *, int); // rsort_with_index used 77 times in 40 packages
void Rf_revsort(double*, int*, int); // Rf_revsort unused
// revsort used 60 times in 20 packages
void Rf_iPsort(int*, int, int); // Rf_iPsort unused
// iPsort used 3 times in matrixStats, robustbase
void Rf_rPsort(double*, int, int); // Rf_rPsort unused
// rPsort used 63 times in 15 packages
void Rf_cPsort(Rcomplex*, int, int); // Rf_cPsort unused
// cPsort unused
void R_qsort (double *v, size_t i, size_t j); // R_qsort used 10 times in extWeibQuant, pomp, robustbase, dplR, tclust, pcaPP
void R_qsort_I (double *v, int *II, int i, int j); // R_qsort_I used 33 times in 15 packages
void R_qsort_int (int *iv, size_t i, size_t j); // R_qsort_int unused
void R_qsort_int_I(int *iv, int *II, int i, int j); // R_qsort_int_I used 19 times in ff, matrixStats, arules, Rborist, slam, eco, bnlearn
const char *R_ExpandFileName(const char *); // R_ExpandFileName used 42 times in 20 packages
void Rf_setIVector(int*, int, int); // Rf_setIVector unused
// setIVector unused
void Rf_setRVector(double*, int, double); // Rf_setRVector unused
// setRVector used 3 times in RcppClassic, RcppClassicExamples
Rboolean Rf_StringFalse(const char *); // Rf_StringFalse unused
// StringFalse used 3 times in iotools
Rboolean Rf_StringTrue(const char *); // Rf_StringTrue unused
// StringTrue used 3 times in iotools
Rboolean Rf_isBlankString(const char *); // Rf_isBlankString unused
// isBlankString used 1 times in iotools
double R_atof(const char *str); // R_atof used 9 times in SSN, tree, foreign, iotools
double R_strtod(const char *c, char **end); // R_strtod used 4 times in ape, iotools
char *R_tmpnam(const char *prefix, const char *tempdir); // R_tmpnam used 2 times in geometry
char *R_tmpnam2(const char *prefix, const char *tempdir, const char *fileext); // R_tmpnam2 unused
void R_CheckUserInterrupt(void); // R_CheckUserInterrupt used 1487 times in 234 packages
void R_CheckStack(void); // R_CheckStack used 115 times in vcrpart, actuar, cplm, lme4, Matrix, GNE, randtoolbox, HiPLARM, rngWELL, pedigreemm
void R_CheckStack2(size_t); // R_CheckStack2 unused
int findInterval(double *xt, int n, double x, // findInterval used 11 times in BSquare, DNAprofiles, unfoldr, chebpol, pomp, eco, protViz, PBSmapping, spatstat
Rboolean rightmost_closed, Rboolean all_inside, int ilo,
int *mflag);
void find_interv_vec(double *xt, int *n, double *x, int *nx, // find_interv_vec unused
int *rightmost_closed, int *all_inside, int *indx);
void R_max_col(double *matrix, int *nr, int *nc, int *maxes, int *ties_meth); // R_max_col used 2 times in geostatsp, MNP
}
Stats
0 1 2 3 4 5 6 7 8 9 10+
Macro: 15 3 6 3 2 1 2 0 0 1 36 (usage count)
(69) 15 11 4 2 5 2 1 1 1 0 27 (distinct package count)
Function: 8 2 4 4 3 2 2 0 1 1 32 (usage count)
(59) 8 7 5 3 4 1 1 2 0 1 27 (distinct package count)
Variable: 0 0 0 0 0 0 0 0 0 0 5 (usage count)
(5) 0 0 0 0 0 0 0 0 0 0 5 (distinct package count)
TypeDef: 2 0 0 0 0 0 0 0 0 0 3 (usage count)
(5) 2 0 0 0 0 0 0 0 1 0 2 (distinct package count)
Alias: 3 1 2 4 1 0 0 0 0 0 11 (usage count)
(22) 3 6 2 0 0 0 0 0 0 0 11 (distinct package count)
(e.g., 5 functions were referenced by exactly 2 distinct packages, and 3 typedefs have 10 or more individual usages)