Exemplo n.º 1
0
    sexp_p[i] = v[i];							\
  }									\
  R_PreserveObject(sexp);						\
  UNPROTECT(1);								\
  RStatus ^= RINTERF_IDLE;						\
  return sexp;								\


SEXP
SexpDoubleVector_new(double *v, int n) {
  RINTERF_NEWVECTOR(NUMERIC_POINTER, NEW_NUMERIC(n), double)
}

SEXP
SexpDoubleVector_new_nofill(int n) {
  RINTERF_NEWVECTOR_NOFILL(NEW_NUMERIC(n))
}

SEXP
SexpDoubleVectorMatrix_new(double *v, int nx, int ny) {
  int n = nx * ny;
  RINTERF_NEWVECTOR(NUMERIC_POINTER, allocMatrix(REALSXP, nx, ny), double)
}

SEXP
SexpDoubleVectorMatrix_new_nofill(int nx, int ny) {
  RINTERF_NEWVECTOR_NOFILL(allocMatrix(REALSXP, nx, ny))
}

SEXP
SexpStrVector_new(char **v, int n) {
Exemplo n.º 2
0
    sexp_p[i] = v[i];							\
  }									\
  R_PreserveObject(sexp);						\
  UNPROTECT(1);								\
  RStatus ^= RINTERF_IDLE;						\
  return sexp;								\


SEXP
SexpDoubleVector_new(double *v, int n) {
    RINTERF_NEWVECTOR(NUMERIC_POINTER, NEW_NUMERIC(n), double)
}

SEXP
SexpDoubleVector_new_nofill(int n) {
    RINTERF_NEWVECTOR_NOFILL(NEW_NUMERIC(n))
}

SEXP
SexpDoubleVectorMatrix_new(double *v, int nx, int ny) {
    int n = nx * ny;
    RINTERF_NEWVECTOR(NUMERIC_POINTER, allocMatrix(REALSXP, nx, ny), double)
}

SEXP
SexpDoubleVectorMatrix_new_nofill(int nx, int ny) {
    int n = nx * ny;
    RINTERF_NEWVECTOR_NOFILL(allocMatrix(REALSXP, nx, ny))
}

SEXP