R C API resize matrice
Please do not re-post -- you have asked this before here. As this list is about R programming help, it is perhaps not surprising that you did not receive a reply. You might try R-devel instead where " Questions likely to prompt discussion unintelligible to non-programmers or topics that are too technical for R-help?s audience should go to R-devel..." Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Fri, Jun 14, 2019 at 11:41 AM Morgan Morgan <morgan.emailbox at gmail.com> wrote:
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]]
______________________________________________ R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.