You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The biggest difference from the gnlrim and repeated experience: rmutil doesn't do roxygen. So don't do any CMD+SHFT+D stuff.
The second biggest difference is that the call_R() wasn't just in romberg.c. It was also in the entry inthp / TOMS614. They are called in the different int and int2 functions.
So here's how we will tackle it:
✅ Make a new branch.
✅ Change the version in the DESC
✅ Change the NEWS file
✅ Change the cran-comments file
✅ rhub::check(platform = "debian-clang-devel") to see warnings about call_R for both romberg and toms
✅ start working on romberg first since we have experience
✅ drop gnlrim/src/romberg_sexp.c into repeated/src/romberg_sexp
✅ edit src/repeated_init.c to accommodate the .Call() entry for romberg_sexp
✅ put #include <Rinternals.h> at the top so it knows SEXP type
✅ edit chunks starting at line 40 and again at line 197 changing .C("romberg" into .Call("romberg_sexp"
✅ (remembering PACKAGE="rmutil")
✅ hold your breath CMD+SHFT+B
✅ close out R studio and delete all *.o files; reopen project
✅ hold your breath CMD+SHFT+B
✅ test a bit on examples.
✅ since you've removed romberg.c from the pipeline you need to edit repeated_init.c -- just comment out the lines pertaining to romberg_centry
* ✅ delete all *.o, CMD+SHFT+B, and rhub::check(platform = "debian-clang-devel") successful w/out warnings about call_R from romberg (toms is ok, we'll get that in a sec)
✅ do enough rhubs to write in the cran-comments that you tested thoroughly and only getting complaints about toms
✅ git add; git commit
🌟 Now do it again for TOMS614!
✅ Need to look closely at the C. First off I want to see if I can remove the .fsrc file and be ok. so remove it and do a CMD+SHFT+B and a rhub::check(platform = "debian-clang-devel"). Also run examples from ?int using TOMS
✅ edit rmutil_init: comment out .C related lines; write .Call related lines similar to romberg_sexp -- toms614 only has inthp in it.
copy toms614.c to toms614_sexp.c. and do the following: BE VERY CAREFUL.
put in same header refs as the tops of romberg_sexp.c
call_R's are at line 458; 467; 476, 485, 520, 533, 593, 608
looking at how length is used it looks like it is set to 1, where as it was a variable in romberg. This observation combined with reading the ?int help file shows that only romberg was vectorized; toms614 was not. So i think this might simplify some of the for loops implementation I was doing -- as in, I won't have to do them. And i can just set the length of the state2 vector to 1. I can protect/unprotect things at the top/bottom of each if() statement. Let's jump in.
then remember that all the args have to be SEXP and then you have to declare them again as the *capitallized version of the argument, then find/replace all of them
and I'll be honest I started hacking on stuff and got ahead of myself and trusted my gut and looks like it is working.
Then
✅ do enough rhubs to write in the cran-comments that you tested thoroughly and only getting complaints about ANYTHING.
✅ git add; git commit
✅ push branch to github
✅ merge with master in browser on github
✅ get back on master branch in Rstudio
✅ git pull
✅ submit to cran with devtools::submit_cran()
✅ check CRAN results to see if worked.
✅ given it worked, celebrate having fixed repeated and rmutil!
🎆 SUPER BONUS! -- consider getting gnlrim to use int2 and make it handle 2 random effects! (in progress).
The text was updated successfully, but these errors were encountered:
Luckily I've hammered this out in
gnlrim
. See this issue for the stream of consciousness journey of learning and recoding and how I handled the issue inrepeated
The biggest difference from the gnlrim and repeated experience:
rmutil
doesn't do roxygen. So don't do anyCMD+SHFT+D
stuff.The second biggest difference is that the call_R() wasn't just in romberg.c. It was also in the entry inthp / TOMS614. They are called in the different int and int2 functions.
So here's how we will tackle it:
✅ Make a new branch.
✅ Change the version in the DESC
✅ Change the NEWS file
✅ Change the cran-comments file
✅
rhub::check(platform = "debian-clang-devel")
to see warnings aboutcall_R
for both romberg and toms✅ start working on romberg first since we have experience
✅ drop gnlrim/src/romberg_sexp.c into repeated/src/romberg_sexp
✅ edit src/repeated_init.c to accommodate the .Call() entry for romberg_sexp
#include <Rinternals.h>
at the top so it knows SEXP typeSEXP romberg_sexp(SEXP fcn, SEXP a, SEXP b, SEXP len, SEXP eps, SEXP pts, SEXP max, SEXP err, SEXP envir);
instead ofextern void romberg_sexp(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *);
✅ edit chunks starting at line 40 and again at line 197 changing
.C("romberg"
into.Call("romberg_sexp"
✅ hold your breath CMD+SHFT+B
✅ close out R studio and delete all *.o files; reopen project
✅ hold your breath CMD+SHFT+B
✅ test a bit on examples.
✅ since you've removed romberg.c from the pipeline you need to edit repeated_init.c -- just comment out the lines pertaining to
romberg_c
entry* ✅ delete all *.o, CMD+SHFT+B, and
rhub::check(platform = "debian-clang-devel")
successful w/out warnings aboutcall_R
from romberg (toms is ok, we'll get that in a sec)✅ do enough rhubs to write in the cran-comments that you tested thoroughly and only getting complaints about toms
✅ git add; git commit
🌟 Now do it again for TOMS614!
✅ Need to look closely at the C. First off I want to see if I can remove the .fsrc file and be ok. so remove it and do a CMD+SHFT+B and a
rhub::check(platform = "debian-clang-devel")
. Also run examples from ?int using TOMS✅ edit rmutil_init: comment out .C related lines; write .Call related lines similar to romberg_sexp -- toms614 only has inthp in it.
copy toms614.c to toms614_sexp.c. and do the following: BE VERY CAREFUL.
for
loops implementation I was doing -- as in, I won't have to do them. And i can just set the length of the state2 vector to 1. I can protect/unprotect things at the top/bottom of each if() statement. Let's jump in.SEXP call2, result2, state2, tmp;
somewhere, say line 277try replacing every call_r statement with;
Then
devtools::submit_cran()
repeated
andrmutil
!The text was updated successfully, but these errors were encountered: