Skip to main content

Crate libR_sys

Crate libR_sys 

Source
Expand description

A low-level libR binding library which is kept deliberately minimal.

In particular, it has no external dependencies other that libR installed on the target.

§Synopsis

The libR-sys crate is a low level bindgen wrapper for the R programming language. The intention is to allow one or more extension mechanisms to be implemented for rust.

Effort to make the extension libraries platform-independent can be concentrated here.

§Examples

use libR_sys::{Rf_initialize_R, R_CStackLimit, setup_Rmainloop};
use std::os::raw;

unsafe {
  std::env::set_var("R_HOME", "/usr/lib/R");
  let arg0 = "R\0".as_ptr() as *mut raw::c_char;
  Rf_initialize_R(1, [arg0].as_mut_ptr());
  R_CStackLimit = usize::max_value();
  setup_Rmainloop();
}

§Conditional compilation depending on R installation

The libR-sys crate provides these environmental variables that you can use in build.rs:

  • DEP_R_R_VERSION_MAJOR: The major part of the R version (e.g. 4 in version 4.1.0)
  • DEP_R_R_VERSION_MINOR: The minor part of the R version (e.g. 1 in version 4.1.0)
  • DEP_R_R_VERSION_PATCH: The patch part of the R version (e.g. 0 in version 4.1.0)
  • DEP_R_R_VERSION_DEVEL: true if the R is a development version, otherwise false
  • DEP_R_R_VERSION_STRING: The full version string (e.g. R version 4.1.0 (2021-05-18))
  • DEP_R_R_HOME: The R home directory

§Example build.rs

ⓘ
use std::env;

fn main() {
    // Set R_HOME envvar, and refer to it on compile time by env!("R_HOME")
    let r_home = env::var("DEP_R_R_HOME").unwrap();
    println!("cargo:rustc-env=R_HOME={}", r_home);

    // Enable cfg setting to conditionally compile a code using a feature
    // available only on newer versions of R
    let major = env::var("DEP_R_R_VERSION_MAJOR").unwrap();
    let minor = env::var("DEP_R_R_VERSION_MINOR").unwrap();
    if &*major >= "4" && &*minor >= "1" {
        println!("cargo:rustc-cfg=use_a_feature");
    }
}

Structs§

GESystemDesc
R_CMethodDef
These are very similar to those in Rdynpriv.h, but we maintain them separately to give us more freedom to do some computations on the internal versions that are derived from these definitions.
R_CallMethodDef
R_GE_gcontext
A structure containing graphical parameters
R_allocator
R_altrep_class_t
R_hashtab_type
try to allow some type checking
R_inpstream_st
R_outpstream_st
Rcomplex
R 4.3 redefined Rcomplex to a union for compatibility with Fortran. But the old definition is compatible both the union version and the struct version. See: https://github.com/extendr/extendr/issues/524
Rf_RegisteredNativeSymbol
SEXPREC
_DevDesc
_DllInfo
_GEDevDesc
_IO_FILE
_IO_codecvt
_IO_marker
_IO_wide_data
__BindgenBitfieldUnit
__va_list_tag
structRstart

Enums§

GEUnit
The graphics engine will only accept locations and dimensions in native device coordinates, but it provides the following functions for converting between a couple of simple alternative coordinate systems and device coordinates: DEVICE = native units of the device NDC = Normalised device coordinates INCHES = inches (!) CM = centimetres (!!)
GEevent
N01type
Different kinds of “N(0,1)” generators :
NativeSymbolType
ParseStatus
PARSE_NULL will not be returned by R_ParseVector
RNGtype
R_GE_lineend
Some line end/join constants
R_GE_linejoin
R_KeyName
These give the indices of some known keys
R_MouseEvent
These are the three possible mouse events
R_pstream_format_t
Rboolean
SA_TYPE
Startup Actions
SEXPTYPE
—— enum_SEXPTYPE —–
Sampletype
Different ways to generate discrete uniform samples
_bindgen_ty_2
ALTREP sorting support
cetype_t
cetype_t is an identifier reseved by POSIX, but it is well established as public. Could remap by a #define though
nchar_type
../main/character.c :

Constants§

DEG2RAD
ENABLE_NLS
HAVE_ALLOCA_H
HAVE_EXPM1
HAVE_F77_UNDERSCORE
HAVE_HYPOT
HAVE_LOG1P
HAVE_UINTPTR_T
HAVE_VISIBILITY_ATTRIBUTE
HAVE_WORKING_LOG1P
HT_TYPE_ADDRESS
HT_TYPE_IDENTICAL
IDENT_ATTR_BY_ORDER
IDENT_EXTPTR_AS_REF
IDENT_NA_AS_BITS
IDENT_NUM_AS_BITS
IDENT_USE_BYTECODE
IDENT_USE_CLOENV
IDENT_USE_SRCREF
IEEE_754
KNOWN_UNSORTED
LTY_BLANK
LTY_DASHED
LTY_DOTDASH
LTY_DOTTED
LTY_LONGDASH
LTY_SOLID
LTY_TWODASH
MAX_GRAPHICS_SYSTEMS
MAX_NUM_SEXPTYPE
M_1_SQRT_2PI
M_LN_2PI
M_LN_SQRT_2PI
M_LN_SQRT_PI
M_LN_SQRT_PId2
M_SQRT_3
M_SQRT_2dPI
M_SQRT_32
M_SQRT_PI
NAMEDMAX
PR18534fixed
RSTART_VERSION
R_CODESET_MAX
R_DAY
R_GE_alphaMask
R_GE_capability_capture
R_GE_capability_clippingPaths
R_GE_capability_compositing
R_GE_capability_events
R_GE_capability_glyphs
R_GE_capability_locator
R_GE_capability_masks
R_GE_capability_paths
R_GE_capability_patterns
R_GE_capability_rasterImage
R_GE_capability_semiTransparency
R_GE_capability_transformations
R_GE_capability_transparentBackground
R_GE_compositeAdd
R_GE_compositeAtop
R_GE_compositeClear
R_GE_compositeColorBurn
R_GE_compositeColorDodge
R_GE_compositeDarken
R_GE_compositeDest
R_GE_compositeDestAtop
R_GE_compositeDestIn
R_GE_compositeDestOut
R_GE_compositeDestOver
R_GE_compositeDifference
R_GE_compositeExclusion
R_GE_compositeHardLight
R_GE_compositeIn
R_GE_compositeLighten
R_GE_compositeMultiply
R_GE_compositeOut
R_GE_compositeOver
R_GE_compositeOverlay
R_GE_compositeSaturate
R_GE_compositeScreen
R_GE_compositeSoftLight
R_GE_compositeSource
R_GE_compositeXor
R_GE_definitions
R_GE_deviceClip
R_GE_evenOddRule
R_GE_glyphs
R_GE_group
R_GE_linearGradientPattern
R_GE_luminanceMask
R_GE_nonZeroWindingRule
R_GE_patternExtendNone
R_GE_patternExtendPad
R_GE_patternExtendReflect
R_GE_patternExtendRepeat
R_GE_radialGradientPattern
R_GE_text_style_italic
R_GE_text_style_normal
R_GE_text_style_oblique
R_GE_tilingPattern
R_GE_version
R_MAJOR
R_MINOR
R_MONTH
R_NICK
R_PRIdXLEN_T
R_SHORT_LEN_MAX
R_STATUS
R_SVN_REVISION
R_USE_PROTOTYPES
R_VERSION
R_VERSION_STRING
R_XDR_DOUBLE_SIZE
R_XDR_INTEGER_SIZE
R_XLEN_T_MAX
R_YEAR
SINGLESXP
SIZEOF_SIZE_T
SORTED_DECR
SORTED_DECR_NA_1ST
SORTED_INCR
SORTED_INCR_NA_1ST
SUPPORT_MBCS
SUPPORT_UTF8
TYPE_BITS
UNKNOWN_SORTEDNESS
__STDC_WANT_IEC_60559_FUNCS_EXT__
leftButton
middleButton
rightButton

Statics§

R_AsCharacterSymbol⚠
“as.character”
R_AtsignSymbol⚠
“@”
R_BaseEnv⚠
The base environment; formerly R_NilValue
R_BaseNamespace⚠
The (fake) namespace for base
R_BaseSymbol⚠
“base”
R_BlankScalarString⚠
“” as a STRSXP
R_BlankString⚠
“” as a CHARSXP
R_BraceSymbol⚠
“{”
R_Bracket2Symbol⚠
“[[”
R_BracketSymbol⚠
“[”
R_CStackLimit⚠
C stack limit
R_ClassSymbol⚠
“class”
R_CurrentExpression⚠
Use current expression (marker)
R_DeviceSymbol⚠
“.Device”
R_DimNamesSymbol⚠
“dimnames”
R_DimSymbol⚠
“dim”
R_DollarSymbol⚠
“$”
R_DotsSymbol⚠
“…”
R_DoubleColonSymbol⚠
“::”
R_DropSymbol⚠
“drop”
R_EmptyEnv⚠
An empty environment at the root of the environment tree
R_EvalSymbol⚠
“eval”
R_FunctionSymbol⚠
“function”
R_GlobalEnv⚠
The “global” environment
R_InBCInterpreter⚠
To be found in BC interp. state (marker)
R_LastvalueSymbol⚠
“.Last.value”
R_LevelsSymbol⚠
“levels”
R_MissingArg⚠
Missing argument marker
R_ModeSymbol⚠
“mode”
R_NaInt⚠
NA_INTEGER:= INT_MIN currently
R_NaN⚠
IEEE NaN
R_NaReal⚠
NA_REAL: IEEE
R_NaRmSymbol⚠
“na.rm”
R_NaString⚠
NA_STRING as a CHARSXP
R_NameSymbol⚠
“name”
R_NamesSymbol⚠
“names”
R_NamespaceEnvSymbol⚠
“.NAMESPACE.”
R_NamespaceRegistry⚠
Registry for registered namespaces
R_NegInf⚠
IEEE -Inf
R_NilValue⚠
The nil object
R_PackageSymbol⚠
“package”
R_PosInf⚠
IEEE Inf
R_PreviousSymbol⚠
“previous”
R_QuoteSymbol⚠
“quote”
R_RestartToken⚠
Marker for restarted function calls
R_RowNamesSymbol⚠
“row.names”
R_SeedsSymbol⚠
“.Random.seed”
R_SortListSymbol⚠
“sort.list”
R_SourceSymbol⚠
“source”
R_SpecSymbol⚠
“spec”
R_Srcref⚠
Current srcref, for debuggers
R_TripleColonSymbol⚠
“:::”
R_TspSymbol⚠
“tsp”
R_UnboundValue⚠
Unbound marker
R_baseSymbol⚠
<– backcompatible version of:
R_dot_Generic⚠
“.Generic”
R_dot_Method⚠
“.Method”
R_dot_defined⚠
“.defined”
R_dot_packageName⚠
“.packageName”
R_dot_target⚠
“.target”
R_interrupts_pending⚠
R_interrupts_suspended⚠
mbcslocale⚠

Functions§

ALTREP⚠
ALTREP_CLASS⚠
ALTREP support
ATTRIB⚠
General Cons Cell Attributes
BODY⚠
CAAR⚠
CAD4R⚠
CAD5R⚠
CADDDR⚠
CADDR⚠
CADR⚠
CAR⚠
CDAR⚠
CDDDR⚠
CDDR⚠
CDR⚠
CLOENV⚠
COMPLEX⚠
COMPLEX_ELT⚠
COMPLEX_GET_REGION⚠
COMPLEX_OR_NULL⚠
COMPLEX_RO⚠
CleanEd⚠
DATAPTR⚠
DATAPTR_OR_NULL⚠
DATAPTR_RO⚠
DUPLICATE_ATTRIB⚠
ENCLOS⚠
EXTPTR_PROT⚠
External pointer access macros
EXTPTR_PTR⚠
EXTPTR_TAG⚠
FORMALS⚠
Closure Access Functions
GECap⚠
GECircle⚠
GEExpressionHeight⚠
GEExpressionMetric⚠
GEExpressionWidth⚠
From plotmath.c
GEFill⚠
GEFillStroke⚠
GEGlyph⚠
GELine⚠
GEMathText⚠
GEMetricInfo⚠
GEMode⚠
GENewPage⚠
GEPath⚠
GEPolygon⚠
GEPolyline⚠
GEPretty⚠
GERaster⚠
GERect⚠
GESetClip⚠
GEStrHeight⚠
GEStrMetric⚠
GEStrWidth⚠
GEStroke⚠
GESymbol⚠
GEText⚠
GEXspline⚠
GE_LENDget⚠
GE_LENDpar⚠
GE_LJOINget⚠
GE_LJOINpar⚠
GE_LTYget⚠
GE_LTYpar⚠

GEaddDevice⚠
GEaddDevice2⚠
GEaddDevice2f⚠
GEcheckState⚠
GEcontourLines⚠
From plot3d.c : used in package clines
GEcopyDisplayList⚠
GEcreateDevDesc⚠
GEcreateSnapshot⚠
GEcurrentDevice⚠
GEdestroyDevDesc⚠
GEdeviceDirty⚠
GEdeviceNumber⚠
GEdirtyDevice⚠
GEfromDeviceHeight⚠
GEfromDeviceWidth⚠
GEfromDeviceX⚠
GEfromDeviceY⚠
GEgetDevice⚠
GEhandleEvent⚠
GEinitDisplayList⚠
GEkillDevice⚠
GEnullDevice⚠
GEonExit⚠
GEplayDisplayList⚠
GEplaySnapshot⚠
GErecordGraphicOperation⚠
GErecording⚠
GEregisterSystem⚠
GEregisterWithDevice⚠
GEstring_to_pch⚠
GEsystemState⚠
GEtoDeviceHeight⚠
GEtoDeviceWidth⚠
GEtoDeviceX⚠
GEtoDeviceY⚠
GEunregisterSystem⚠
GetRNGstate⚠
INTEGER⚠
INTEGER0⚠
INTEGER_ELT⚠
INTEGER_GET_REGION⚠
INTEGER_IS_SORTED⚠
metadata access
INTEGER_NO_NA⚠
INTEGER_OR_NULL⚠
INTEGER_RO⚠
IS_LONG_VEC⚠
IS_S4_OBJECT⚠
S4 object testing
IS_SCALAR⚠
LENGTH⚠
Vector Access Functions
LENGTH_EX⚠
LOGICAL⚠
LOGICAL0⚠
LOGICAL_ELT⚠
LOGICAL_GET_REGION⚠
LOGICAL_IS_SORTED⚠
LOGICAL_NO_NA⚠
LOGICAL_OR_NULL⚠
LOGICAL_RO⚠
MARK⚠
MARK_NOT_MUTABLE⚠
MISSING⚠
OBJECT⚠
PRINTNAME⚠
Symbol Access Functions
PutRNGstate⚠
RAW⚠
RAW0⚠
RAW_ELT⚠
RAW_GET_REGION⚠
RAW_OR_NULL⚠
RAW_RO⚠
REAL⚠
REAL_ELT⚠
REAL_GET_REGION⚠
REAL_IS_SORTED⚠
REAL_NO_NA⚠
REAL_OR_NULL⚠
REAL_RO⚠
REFCNT⚠
REprintf⚠
REvprintf⚠
RSTEP⚠
RTRACE⚠
R_ActiveBindingFunction⚠
R_BindingIsActive⚠
R_BindingIsLocked⚠
R_BytecodeExpr⚠
R_CHAR⚠
R_CheckDeviceAvailable⚠
Check for an available device slot
R_CheckDeviceAvailableBool⚠
R_CheckStack⚠
R_CheckStack2⚠
R_CheckUserInterrupt⚠
R_CleanTempDir⚠
R_ClearExternalPtr⚠
R_ClosureExpr⚠
R_ContinueUnwind⚠
R_EnvironmentIsLocked⚠
R_ExecWithCleanup⚠
R_ExpandFileName⚠
../../main/util.c and others :
R_ExternalPtrAddr⚠
R_ExternalPtrAddrFn⚠
R_ExternalPtrProtected⚠
R_ExternalPtrTag⚠
R_FindNamespace⚠
R_FindPackageEnv⚠
R_FindSymbol⚠
R_FlushConsole⚠
R_GE_VStrHeight⚠
R_GE_VStrWidth⚠
From vfonts.c
R_GE_VText⚠
R_GE_checkVersionOrDie⚠
R_GE_clipPathFillRule⚠
R_GE_getVersion⚠
R_GE_glyphColour⚠
R_GE_glyphFont⚠
R_GE_glyphFontFamily⚠
R_GE_glyphFontFile⚠
R_GE_glyphFontIndex⚠
R_GE_glyphFontPSname⚠
R_GE_glyphFontStyle⚠
R_GE_glyphFontWeight⚠
R_GE_glyphID⚠
R_GE_glyphInfoFonts⚠
R_GE_glyphInfoGlyphs⚠
R_GE_glyphSize⚠
R_GE_glyphX⚠
R_GE_glyphY⚠
R_GE_isPattern⚠
Patterns - from ../../main/patterns.c
R_GE_linearGradientColour⚠
R_GE_linearGradientExtend⚠
R_GE_linearGradientNumStops⚠
R_GE_linearGradientStop⚠
R_GE_linearGradientX1⚠
R_GE_linearGradientX2⚠
R_GE_linearGradientY1⚠
R_GE_linearGradientY2⚠
R_GE_maskType⚠
R_GE_patternType⚠
R_GE_radialGradientCX1⚠
R_GE_radialGradientCX2⚠
R_GE_radialGradientCY1⚠
R_GE_radialGradientCY2⚠
R_GE_radialGradientColour⚠
R_GE_radialGradientExtend⚠
R_GE_radialGradientNumStops⚠
R_GE_radialGradientR1⚠
R_GE_radialGradientR2⚠
R_GE_radialGradientStop⚠
R_GE_rasterInterpolate⚠
R_GE_rasterResizeForRotation⚠
R_GE_rasterRotate⚠
R_GE_rasterRotatedOffset⚠
R_GE_rasterRotatedSize⚠
R_GE_rasterScale⚠
Raster operations
R_GE_str2col⚠
Convert either a name or a #RRGGBB[AA] string to internal. Because people were using it, it also converts “1”, “2” … to a colour in the palette, and “0” to transparent white.
R_GE_tilingPatternExtend⚠
R_GE_tilingPatternFunction⚠
R_GE_tilingPatternHeight⚠
R_GE_tilingPatternWidth⚠
R_GE_tilingPatternX⚠
R_GE_tilingPatternY⚠
R_GetCCallable⚠
R_GetCurrentEnv⚠
R_GetCurrentSrcref⚠
srcref related functions
R_GetSrcFilename⚠
R_HasFancyBindings⚠
R_HashtabSEXP⚠
R_InitFileInPStream⚠
R_InitFileOutPStream⚠
R_InitInPStream⚠
R_InitOutPStream⚠
R_IsNA⚠
NA_STRING is a SEXP, so defined in Rinternals.h
R_IsNaN⚠
R_IsNamespaceEnv⚠
R_IsPackageEnv⚠
R_LockBinding⚠
R_LockEnvironment⚠
R_MakeActiveBinding⚠
R_MakeExternalPtr⚠
External pointer interface
R_MakeExternalPtrFn⚠
Added in R 3.4.0
R_MakeUnwindCont⚠
R_MakeWeakRef⚠
Weak reference interface
R_MakeWeakRefC⚠
R_NamespaceEnvSpec⚠
R_NewEnv⚠
Environment and Binding Features
R_NewPreciousMSet⚠
R_PackageEnvName⚠
R_ParseEvalString⚠
R_ParseString⚠
R_ParseVector⚠
R_PreserveInMSet⚠
R_PreserveObject⚠
preserve objects across GCs
R_ProtectWithIndex⚠
R_RegisterCCallable⚠
Interface for exporting and importing functions from one package for use from C code in a package. The registration part probably ought to be integrated with the other registrations. The naming of these routines may be less than ideal.
R_RegisterCFinalizer⚠
R_RegisterCFinalizerEx⚠
R_RegisterFinalizer⚠
R_RegisterFinalizerEx⚠
R_ReleaseFromMSet⚠
R_ReleaseMSet⚠
R_ReleaseObject⚠
R_Reprotect⚠
R_RunExitFinalizers⚠
R_RunPendingFinalizers⚠
R_RunWeakRefFinalizer⚠
R_S4_extends⚠
S3-S4 class (inheritance), attrib.c
R_Serialize⚠
R_SerializeInfo⚠
R_SetExternalPtrAddr⚠
R_SetExternalPtrProtected⚠
R_SetExternalPtrTag⚠
R_ShowMessage⚠
R_ToplevelExec⚠
Protected evaluation
R_Unserialize⚠
R_UnwindProtect⚠
R_WeakRefKey⚠
R_WeakRefValue⚠
R_XDRDecodeDouble⚠
R_XDRDecodeInteger⚠
R_XDREncodeDouble⚠
R_XDREncodeInteger⚠
R_alloc⚠
R_allocLD⚠
R_altrep_data1⚠
R_altrep_data2⚠
R_altrep_inherits⚠
R_asHashtable⚠
public C interface
R_atof⚠
These two are guaranteed to use ‘.’ as the decimal point, and to accept “NA”. Documented since 4.4.0 patched.
R_body_no_src⚠
R_calloc_gc⚠
R_check_class_and_super⚠
supporting a C-level version of is(., .) :
R_check_class_etc⚠
R_chk_calloc⚠
S Like Memory Management
R_chk_free⚠
R_chk_realloc⚠
R_clrhash⚠
R_common_command_line⚠
R_compute_identical⚠
R_csort⚠
R_do_MAKE_CLASS⚠
class definition, new objects (objects.c)
R_do_new_object⚠
R_do_slot⚠
slot management (in attrib.c)
R_do_slot_assign⚠
R_dot_Last⚠
Shutdown actions
R_duplicate_attr⚠
R_existsVarInFrame⚠
R_extends⚠
R_finite⚠
R_forceAndCall⚠
Calling a function with arguments evaluated
R_forceSymbols⚠
R_free_tmpnam⚠
R_gc⚠
R_gc_running⚠
R_getClassDef⚠
R_getClassDef_R⚠
R_getDllInfo⚠
R_getEmbeddingDllInfo⚠
To be used by applications embedding R to register their symbols that are not related to any dynamic module
R_gethash⚠
R_has_methods_attached⚠
R_has_slot⚠
R_isHashtable⚠
R_isTRUE⚠
R_isVirtualClass⚠
R_isort⚠
../../main/sort.c :
R_lsInternal⚠
R_lsInternal3⚠
R_make_altcomplex_class⚠
R_make_altinteger_class⚠
R_make_altlist_class⚠
R_make_altlogical_class⚠
R_make_altraw_class⚠
R_make_altreal_class⚠
R_make_altstring_class⚠
R_malloc_gc⚠
R_maphash⚠
R_maphashC⚠
R_max_col⚠
../../appl/maxcol.c
R_mkhashtab⚠
R_new_altrep⚠
R_numhash⚠
R_orderVector⚠
C version of R’s indx <- order(…, na.last, decreasing) : e.g. arglist = Rf_lang2(x,y) or Rf_lang3(x,y,z)
R_orderVector1⚠
C version of R’s indx <- order(x, na.last, decreasing) :
R_pow⚠
R’s versions with !R_FINITE checks
R_pow_di⚠
R_pretty⚠
appl/pretty.c: for use in engine.c and util.c
R_qsort⚠
../../main/qsort.c : / / dummy renamed to II to avoid problems with g++ on Solaris
R_qsort_I⚠
R_qsort_int⚠
R_qsort_int_I⚠
R_realloc_gc⚠
R_registerRoutines⚠
R_remhash⚠
R_removeVarFromFrame⚠
R_rsort⚠
R_sample_kind⚠
R_set_altcomplex_Elt_method⚠
R_set_altcomplex_Get_region_method⚠
R_set_altinteger_Elt_method⚠
R_set_altinteger_Get_region_method⚠
R_set_altinteger_Is_sorted_method⚠
R_set_altinteger_Max_method⚠
R_set_altinteger_Min_method⚠
R_set_altinteger_No_NA_method⚠
R_set_altinteger_Sum_method⚠
R_set_altlist_Elt_method⚠
R_set_altlist_Set_elt_method⚠
R_set_altlogical_Elt_method⚠
R_set_altlogical_Get_region_method⚠
R_set_altlogical_Is_sorted_method⚠
R_set_altlogical_No_NA_method⚠
R_set_altlogical_Sum_method⚠
R_set_altraw_Elt_method⚠
R_set_altraw_Get_region_method⚠
R_set_altreal_Elt_method⚠
R_set_altreal_Get_region_method⚠
R_set_altreal_Is_sorted_method⚠
R_set_altreal_Max_method⚠
R_set_altreal_Min_method⚠
R_set_altreal_No_NA_method⚠
R_set_altreal_Sum_method⚠
R_set_altrep_Coerce_method⚠
R_set_altrep_DuplicateEX_method⚠
R_set_altrep_Duplicate_method⚠
R_set_altrep_Inspect_method⚠
R_set_altrep_Length_method⚠
R_set_altrep_Serialized_state_method⚠
R_set_altrep_UnserializeEX_method⚠
R_set_altrep_Unserialize_method⚠
R_set_altrep_data1⚠
R_set_altrep_data2⚠
R_set_altstring_Elt_method⚠
R_set_altstring_Is_sorted_method⚠
R_set_altstring_No_NA_method⚠
R_set_altstring_Set_elt_method⚠
R_set_altvec_Dataptr_method⚠
R_set_altvec_Dataptr_or_null_method⚠
R_set_altvec_Extract_subset_method⚠
R_sethash⚠
R_strtod⚠
R_system⚠
R_tmpnam⚠
R_tmpnam2⚠
R_tryCatch⚠
R_tryCatchError⚠
R_tryEval⚠
R_tryEvalSilent⚠
R_typeToChar⚠
R_typhash⚠
R_unLockBinding⚠
R_unif_index⚠
R_useDynamicSymbols⚠
R_withCallingErrorHandler⚠
Rdqagi⚠
Rdqags⚠
vectorizing function f(x[1:n], …) -> x[] {overwriting x[]}.
Rf_AdobeSymbol2utf8⚠
Rf_CreateAtVector⚠
Rf_GAxisPars⚠
Rf_GetArrayDimnames⚠
Rf_GetColNames⚠
Rf_GetMatrixDimnames⚠
Rf_GetOption⚠
Rf_GetOption1⚠
Rf_GetOptionDigits⚠
Rf_GetOptionWidth⚠
Rf_GetRowNames⚠
Rf_NewFrameConfirm⚠
Rf_NoDevices⚠
Rf_NumDevices⚠
Rf_PairToVectorList⚠
Rf_PrintValue⚠
Rf_RGBpar⚠
Rf_RGBpar3⚠
Rf_S3Class⚠
Rf_ScalarComplex⚠
Rf_ScalarInteger⚠
Rf_ScalarLogical⚠
Rf_ScalarRaw⚠
Rf_ScalarReal⚠
Rf_ScalarString⚠
Rf_StringBlank⚠
Rf_StringFalse⚠
Rf_StringTrue⚠
Rf_VectorToPairList⚠
Rf_acopy_string⚠
Other Internally Used Functions, excluding those which are inline-able
Rf_alloc3DArray⚠
Rf_allocArray⚠
Rf_allocLang⚠
Rf_allocList⚠
Rf_allocMatrix⚠
Rf_allocS4Object⚠
Rf_allocSExp⚠
Rf_allocVector⚠
These are the public inlinable functions that are provided in Rinlinedfuns.h It is essential that these do not appear in any other header file, with or without the Rf_ prefix.
Rf_allocVector3⚠
Rf_any_duplicated⚠
Rf_any_duplicated3⚠
Rf_asChar⚠
Type Coercions of all kinds
Rf_asCharacterFactor⚠
Rf_asComplex⚠
Rf_asInteger⚠
Rf_asLogical⚠
Rf_asReal⚠
Rf_asS4⚠
Rf_bessel_i⚠
Rf_bessel_i_ex⚠
Rf_bessel_j⚠
Rf_bessel_j_ex⚠
Rf_bessel_k⚠
Rf_bessel_k_ex⚠
Rf_bessel_y⚠
Rf_bessel_y_ex⚠
Rf_beta⚠
Rf_cPsort⚠
Rf_choose⚠
Rf_classgets⚠
Rf_coerceVector⚠
Rf_col2name⚠
Rf_conformable⚠
Rf_cons⚠
Rf_copyListMatrix⚠
Rf_copyMatrix⚠
Rf_copyMostAttrib⚠
Rf_copyVector⚠
Rf_curDevice⚠
Rf_dbeta⚠
Rf_dbinom⚠
Rf_dbinom_raw⚠
Rf_dcauchy⚠
Rf_dchisq⚠
Rf_defineVar⚠
Rf_desc2GEDesc⚠
Rf_dexp⚠
Rf_df⚠
Rf_dgamma⚠
Rf_dgeom⚠
Rf_dhyper⚠
Rf_digamma⚠
Rf_dimgets⚠
Rf_dimnamesgets⚠
Rf_dlnorm⚠
Rf_dlogis⚠
Rf_dnbeta⚠
Rf_dnbinom⚠
Rf_dnbinom_mu⚠
Rf_dnchisq⚠
Rf_dnf⚠
Rf_dnorm4⚠
Rf_dnt⚠
Rf_doIdle⚠
Rf_doKeybd⚠
Rf_doMouseEvent⚠
Rf_doesIdle⚠
Rf_dpois⚠
Rf_dpois_raw⚠
Rf_dpsifn⚠
Rf_dsignrank⚠
Rf_dt⚠
Rf_dunif⚠
Rf_duplicate⚠
Rf_duplicated⚠
the next really should not be here and is also in Defn.h
Rf_dweibull⚠
Rf_dwilcox⚠
Rf_elt⚠
Rf_endEmbeddedR⚠
Rf_error⚠
Rf_errorcall⚠
../main/errors.c : / / needed for R_load/savehistory handling in front ends
Rf_eval⚠
Rf_findFun⚠
Rf_findVar⚠
Rf_findVarInFrame⚠
Rf_fmax2⚠
Rf_fmin2⚠
Rf_fprec⚠
Rf_fround⚠
Rf_fsign⚠
Rf_ftrunc⚠
Rf_gammafn⚠
Rf_getAttrib⚠
Rf_getCharCE⚠
Rf_iPsort⚠
Rf_imax2⚠
Rf_imin2⚠
Rf_inherits⚠
Rf_initialize_R⚠
Rf_install⚠
Rf_installChar⚠
Rf_installNoTrChar⚠
Rf_installTrChar⚠
Rf_isArray⚠
Rf_isBasicClass⚠
Rf_isBlankString⚠
Rf_isComplex⚠
Rf_isEnvironment⚠
Rf_isExpression⚠
Rf_isFactor⚠
Rf_isFrame⚠
Rf_isFunction⚠
Rf_isInteger⚠
Rf_isLanguage⚠
Rf_isList⚠
Rf_isLogical⚠
Rf_isMatrix⚠
Rf_isNewList⚠
Rf_isNull⚠
Various tests with macro versions in the internal headers
Rf_isNumber⚠
Rf_isNumeric⚠
Rf_isObject⚠
Rf_isOrdered⚠
Rf_isPairList⚠
Rf_isPrimitive⚠
Rf_isReal⚠
Rf_isS4⚠
Rf_isString⚠
Rf_isSymbol⚠
Rf_isTs⚠
Rf_isUnordered⚠
Rf_isUnsorted⚠
Rf_isUserBinop⚠
Rf_isVector⚠
Rf_isVectorAtomic⚠
Rf_isVectorList⚠
Rf_isVectorizable⚠
Rf_killDevice⚠
Rf_lang1⚠
Rf_lang2⚠
Rf_lang3⚠
Rf_lang4⚠
Rf_lang5⚠
Rf_lang6⚠
Rf_lastElt⚠
Rf_lazy_duplicate⚠
Rf_lbeta⚠
Rf_lchoose⚠
Rf_lcons⚠
Rf_length⚠
Rf_lengthgets⚠
Rf_lgamma1p⚠
Rf_lgammafn⚠
Rf_lgammafn_sign⚠
Rf_list1⚠
Rf_list2⚠
Rf_list3⚠
Rf_list4⚠
Rf_list5⚠
Rf_list6⚠
Rf_listAppend⚠
Rf_log1mexp⚠
Rf_log1pexp⚠
Rf_log1pmx⚠
Rf_logspace_add⚠
Rf_logspace_sub⚠
Rf_logspace_sum⚠
Rf_match⚠
Rf_mkChar⚠
Rf_mkCharCE⚠
Rf_mkCharLen⚠
Rf_mkCharLenCE⚠
Rf_mkNamed⚠
Rf_mkString⚠
Rf_namesgets⚠
Rf_ncols⚠
Rf_ndevNumber⚠
Rf_nextDevice⚠
Rf_nlevels⚠
Rf_nrows⚠
Rf_nthcdr⚠
Rf_onintr⚠
Rf_onintrNoResume⚠
Rf_pbeta⚠
Rf_pbinom⚠
Rf_pcauchy⚠
Rf_pchisq⚠
Rf_pentagamma⚠
Rf_pexp⚠
Rf_pf⚠
Rf_pgamma⚠
Rf_pgeom⚠
Rf_phyper⚠
Rf_plnorm⚠
Rf_plogis⚠
Rf_pnbeta⚠
Rf_pnbinom⚠
Rf_pnbinom_mu⚠
Rf_pnchisq⚠
Rf_pnf⚠
Rf_pnorm5⚠
Rf_pnorm_both⚠
Rf_pnt⚠
Rf_pow1p⚠
Rf_ppois⚠
Rf_prevDevice⚠
Rf_protect⚠
Rf_psigamma⚠
Rf_psignrank⚠
Rf_psmatch⚠
Rf_pt⚠
Rf_ptukey⚠
Rf_punif⚠
Rf_pweibull⚠
Rf_pwilcox⚠
Rf_qbeta⚠
Rf_qbinom⚠
Rf_qcauchy⚠
Rf_qchisq⚠
Rf_qexp⚠
Rf_qf⚠
Rf_qgamma⚠
Rf_qgeom⚠
Rf_qhyper⚠
Rf_qlnorm⚠
Rf_qlogis⚠
Rf_qnbeta⚠
Rf_qnbinom⚠
Rf_qnbinom_mu⚠
Rf_qnchisq⚠
Rf_qnf⚠
Rf_qnorm5⚠
Rf_qnt⚠
Rf_qpois⚠
Rf_qsignrank⚠
Rf_qt⚠
Rf_qtukey⚠
Rf_qunif⚠
Rf_qweibull⚠
Rf_qwilcox⚠
Rf_rPsort⚠
Rf_rbeta⚠
Rf_rbinom⚠
Rf_rcauchy⚠
Rf_rchisq⚠
Rf_reEnc⚠
Rf_reEnc3⚠
Rf_revsort⚠
Rf_rexp⚠
Rf_rf⚠
Rf_rgamma⚠
Rf_rgeom⚠
Rf_rhyper⚠
Rf_rlnorm⚠
Rf_rlogis⚠
Rf_rmultinom⚠
Rf_rnbeta⚠
Rf_rnbinom⚠
Rf_rnbinom_mu⚠
Rf_rnchisq⚠
Rf_rnorm⚠
Rf_rpois⚠
Rf_rsignrank⚠
Rf_rt⚠
Rf_runif⚠
Rf_rweibull⚠
Rf_rwilcox⚠
Rf_selectDevice⚠
Rf_setAttrib⚠
Rf_setIVector⚠
Rf_setRVector⚠
Rf_setVar⚠
Rf_shallow_duplicate⚠
Rf_sign⚠
Rf_str2type⚠
Rf_stringPositionTr⚠
Rf_substitute⚠
Rf_tetragamma⚠
Rf_topenv⚠
Rf_translateChar⚠
Rf_translateCharUTF8⚠
Rf_trigamma⚠
Rf_type2char⚠
Rf_type2rstr⚠
Rf_type2str⚠
Rf_type2str_nowarn⚠
Rf_ucstoutf8⚠
Translates Unicode point to UTF-8
Rf_unprotect⚠
Rf_unprotect_ptr⚠
Rf_utf8ToLatin1AdobeSymbol2utf8⚠
Rf_utf8Toutf8NoPUA⚠
Rf_utf8toAdobeSymbol⚠
Rf_warning⚠
Rf_warningcall⚠
Rf_warningcall_immediate⚠
Rf_xlength⚠
Rf_xlengthgets⚠
Rprintf⚠
Rtanpi⚠
Rvprintf⚠
SETCAD4R⚠
SETCADDDR⚠
SETCADDR⚠
SETCADR⚠
SETCAR⚠
SETCDR⚠
SET_ATTRIB⚠
SET_COMPLEX_ELT⚠
SET_INTEGER_ELT⚠
SET_LOGICAL_ELT⚠
SET_OBJECT⚠
SET_RAW_ELT⚠
SET_REAL_ELT⚠
SET_RSTEP⚠
SET_RTRACE⚠
SET_STRING_ELT⚠
SET_TAG⚠
SET_VECTOR_ELT⚠
SHALLOW_DUPLICATE_ATTRIB⚠
STRING_ELT⚠
STRING_IS_SORTED⚠
STRING_NO_NA⚠
STRING_PTR_RO⚠
S_alloc⚠
S_realloc⚠
TAG⚠
TYPEOF⚠
UNIMPLEMENTED⚠
VECTOR_ELT⚠
SEXP (STRING_ELT)(SEXP x, R_xlen_t i);
WrongArgCount⚠
XLENGTH⚠
cgmin⚠
cospi⚠
exp_rand⚠
findInterval⚠
../../appl/interv.c: first also in Applic.h
findInterval2⚠
find_interv_vec⚠
not API, entry point no longer exists
lbfgsb⚠
nmmin⚠
norm_rand⚠
Random Number Generators
optif9⚠
Also used in packages nlme, pcaPP
rsort_with_index⚠
samin⚠
setup_Rmainloop⚠
signrank_free⚠
sinpi⚠
tanpi⚠
unif_rand⚠
user_norm_rand⚠
user_unif_init⚠
user_unif_nseed⚠
user_unif_rand⚠
user_unif_seedloc⚠
vmaxget⚠
vmaxset⚠
vmmin⚠
wilcox_free⚠

Type Aliases§

DL_FUNC
Called with a variable argument set after casting to a compatible function pointer.
DevDesc
——— New (in 1.4.0) device driver structure ——— NOTES:
DllInfo
FILE
GEDevDesc
GEcallback
Int32
PROTECT_INDEX
We sometimes need to coerce a protected value and place the new coerced value under protection. For these cases PROTECT_WITH_INDEX saves an index of the protection location that can be used to replace the protected value using REPROTECT.
R_CFinalizer_t
Finalization interface
R_ExternalMethodDef
R_FortranMethodDef
These are very similar to those in Rdynpriv.h, but we maintain them separately to give us more freedom to do some computations on the internal versions that are derived from these definitions.
R_NativePrimitiveArgType
R_RegisteredNativeSymbol
R_allocator_t
R_altcomplex_Elt_method_t
R_altcomplex_Get_region_method_t
R_altinteger_Elt_method_t
R_altinteger_Get_region_method_t
R_altinteger_Is_sorted_method_t
R_altinteger_Max_method_t
R_altinteger_Min_method_t
R_altinteger_No_NA_method_t
R_altinteger_Sum_method_t
R_altlist_Elt_method_t
R_altlist_Set_elt_method_t
R_altlogical_Elt_method_t
R_altlogical_Get_region_method_t
R_altlogical_Is_sorted_method_t
R_altlogical_No_NA_method_t
R_altlogical_Sum_method_t
R_altraw_Elt_method_t
R_altraw_Get_region_method_t
R_altreal_Elt_method_t
R_altreal_Get_region_method_t
R_altreal_Is_sorted_method_t
R_altreal_Max_method_t
R_altreal_Min_method_t
R_altreal_No_NA_method_t
R_altreal_Sum_method_t
R_altrep_Coerce_method_t
R_altrep_DuplicateEX_method_t
R_altrep_Duplicate_method_t
R_altrep_Inspect_method_t
R_altrep_Length_method_t
R_altrep_Serialized_state_method_t
R_altrep_UnserializeEX_method_t
R_altrep_Unserialize_method_t
R_altstring_Elt_method_t
R_altstring_Is_sorted_method_t
R_altstring_No_NA_method_t
R_altstring_Set_elt_method_t
R_altvec_Dataptr_method_t
R_altvec_Dataptr_or_null_method_t
R_altvec_Extract_subset_method_t
R_inpstream_t
R_len_t
type for length of (standard, not long) vectors etc
R_outpstream_t
R_pstream_data_t
R_xlen_t
R_xlen_t is defined as int on 32-bit platforms, and that confuses Rust. Keeping it always as ptrdiff_t works fine even on 32-bit.
Rbyte
Rstart
SEXP
_IO_lock_t
__builtin_va_list
__off64_t
__off_t
d2fcn_p
type of pointer to the hessian functions
fcn_p
type of pointer to the target and gradient functions
integr_fn
../../appl/integrate.c
optimfn
main/optim.c
optimgr
pDevDesc
pGEDevDesc
pGEcontext
rcolor

va_list