allocVector.RdAllocates a Vector
allocVector(type, length)Declaration: src/include/Rinternals.h and src/include/Rdefines.h
Implementation: allocVector(SEXPTYPE type, R_xlen_t length) is a simple inline wrapper functions that calls allocVector3(type, length, NULL), cf. src/include/Rinlinedfuns.h
#include <Rinternals.h>
SEXP Rf_allocVector(SEXPTYPE, R_xlen_t)
#define allocVector Rf_allocVectorRelated macros:
#include <Rdefines.h>
#define NEW_LOGICAL(n) Rf_allocVector(LGLSXP,n)
#define NEW_INTEGER(n) Rf_allocVector(INTSXP,n)
#define NEW_NUMERIC(n) Rf_allocVector(REALSXP,n)
#define NEW_CHARACTER(n) Rf_allocVector(STRSXP,n)
#define NEW_COMPLEX(n) Rf_allocVector(CPLXSXP,n)
#define NEW_LIST(n) Rf_allocVector(VECSXP,n)
#define NEW_STRING(n) NEW_CHARACTER(n)
#define NEW_RAW(n) Rf_allocVector(RAWSXP,n)