From morg@n@em@||box @end|ng |rom gm@||@com  Fri Jun 14 23:31:53 2019
From: morg@n@em@||box @end|ng |rom gm@||@com (Morgan Morgan)
Date: Fri, 14 Jun 2019 22:31:53 +0100
Subject: [Rd] R C API resize matrix
Message-ID: <CAL0QV_NPf1NzMJbscLc3QirJcAfG=Ks9ecXPbykk--kFmT_0fw@mail.gmail.com>

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]]



[Rd] R C API resize matrix
Morgan Morgan