[Rd] R C API resize matrix

Morgan Morgan morg@n@em@||box @end|ng |rom gm@||@com
Fri Jun 14 23:31:53 CEST 2019


Hi,

Is there a way to resize a matrix defined as follows:

SEXP a = PROTECT(allocMatrix(INTSXP, 10, 2));
int *pa  = INTEGER(a)

To row = 5 and col = 1 or do I have to allocate a second matrix "b" with
pointer *pb and do a "for" loop to transfer the value of a to b?

Thank you
Best regards
Morgan

	[[alternative HTML version deleted]]



More information about the R-devel mailing list