nlmixrdevelopment / nlmixr

nlmixr: an R package for population PKPD modeling
https://nlmixrdevelopment.github.io/nlmixr/
GNU General Public License v2.0
115 stars 45 forks source link

Object x sometimes appears after fitting, sometimes not #30

Closed JSC67 closed 6 years ago

JSC67 commented 6 years ago

Hi Matt,

At the end of Issue #29 you wrote that you couldn't get the small object x to appear. (x is a 1 x 1 matrix.) Instead of continuing that issue, which you marked as closed, I thought it would be better to open a new one for it. To get the object to appear, start with a new folder that is empty, do a fit, close RStudio session, and then go back to that same folder (which now won't be empty) and repeat this. The first time you should see object x appear but the second time you shouldn't. I attach my results that bear this out.

James first_output.txt second_output.txt

mattfidler commented 6 years ago

Hm. I will see if I can track this down and reproduce it.

Thanks for pointing this out.

mattfidler commented 6 years ago

Just curious, if you do rxClean() first does the issue appear each time you run it.

mattfidler commented 6 years ago

I still cannot reproduce; However I'm using a different version of RxODE.

If you wish to duplicate my version of RxODE you need to do the following from a blank R session:

devtools::install_github("nlmixrdevelopment/PreciseSums");
devtools::install_github("nlmixrdevelopment/RxODE");
mattfidler commented 6 years ago

You should be able to see the version by:

> rxVersion(echo=TRUE)
  _____         ____  _____  ______
 |  __ \       / __ \|  __ \|  ____| 0.7-0
 | |__) |__  _| |  | | |  | | |__
 |  _  / \ \/ / |  | | |  | |  __|
 | | \ \  >  <| |__| | |__| | |____
 |_|  \_\/_/\_\\____/|_____/|______|
JSC67 commented 6 years ago

Object x does appear after using rxClean() with RxODE v.0.6-2. second_output.txt

I'll try with RxODE 0.7 and with precise sums shortly, but I'm MUCH more concerned about two other issues I'll raise shortly, one being a problem I'm having with using nlmixr on bootstrapped data and another with finding the initial likelihoods prior to fitting (for which I use only 1 iteration, which as you mentioned towards the end of Issue 29 should work). If you could help me with those 2 issues, I'd sure appreciate it.

JSC67 commented 6 years ago

Upgrading to RxODE 0.7 caused a command which previously worked under RxODE 0.6-2 to ultimately fail! Ugh! Full output is below. Command is fit.nlme.1cm.lin.theo_sd <- nlmixr(uif.1cm.lin, theo_sd, est="nlme")


R version 3.4.3 (2017-11-30) -- "Kite-Eating Tree"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> devtools::install_github("nlmixrdevelopment/PreciseSums");
Downloading GitHub repo nlmixrdevelopment/PreciseSums@master
from URL https://api.github.com/repos/nlmixrdevelopment/PreciseSums/zipball/master
Installing PreciseSums
"C:/R/R-34~1.3/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet  \
  CMD INSTALL  \
  "C:/Users/James/AppData/Local/Temp/RtmpQF3F1h/devtools170035d2618/nlmixrdevelopment-PreciseSums-70985de"  \
  --library="C:/Users/James/Documents/R/win-library/3.4" --install-tests 

* installing *source* package 'PreciseSums' ...
** libs
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c sum.c -o sum.o
sum.c: In function 'PreciseSums_sum_r':
sum.c:307:48: warning: passing argument 3 of 'PreciseSums_Python_fsum_r' discards 'const' qualifier from pointer target type
     return PreciseSums_Python_fsum_r(input, n, p, m);
                                                ^
sum.c:149:15: note: expected 'double *' but argument is of type 'const double *'
 extern double PreciseSums_Python_fsum_r(double *iterable, int iterable_len, double *p, int m){
               ^
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c prod.c -o prod.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c init.c -o init.o
c:/Rtools/mingw_64/bin/gcc -shared -s -static-libgcc -o PreciseSums.dll tmp.def sum.o prod.o init.o -LC:/R/R-34~1.3/bin/x64 -lR
installing via 'install.libs.R' to C:/Users/James/Documents/R/win-library/3.4/PreciseSums
** R
** tests
** preparing package for lazy loading
** help
*** installing help indices
  converting help for package 'PreciseSums'
    finding HTML links ... done
    fsum                                    html  
    kahanSum                                html  
    neumaierSum                             html  
    pairwiseSum                             html  
    psProd                                  html  
    psSetProd                               html  
    psSetSum                                html  
    psSum                                   html  
** building package indices
** testing if installed package can be loaded
* DONE (PreciseSums)
In R CMD INSTALL
> devtools::install_github("nlmixrdevelopment/RxODE");
Downloading GitHub repo nlmixrdevelopment/RxODE@master
from URL https://api.github.com/repos/nlmixrdevelopment/RxODE/zipball/master
Installing RxODE
Installing 1 package: digest
Installing package into ‘C:/Users/James/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/digest_0.6.15.zip'
Content type 'application/zip' length 175220 bytes (171 KB)
downloaded 171 KB

package ‘digest’ successfully unpacked and MD5 sums checked
Warning: cannot remove prior installation of package ‘digest’

The downloaded binary packages are in
    C:\Users\James\AppData\Local\Temp\RtmpQF3F1h\downloaded_packages
Installing 1 package: mvnfast
Installing package into ‘C:/Users/James/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/mvnfast_0.2.5.zip'
Content type 'application/zip' length 859803 bytes (839 KB)
downloaded 839 KB

package ‘mvnfast’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\James\AppData\Local\Temp\RtmpQF3F1h\downloaded_packages
Downloading GitHub repo nlmixrdevelopment/PreciseSums@master
from URL https://api.github.com/repos/nlmixrdevelopment/PreciseSums/zipball/master
Installing PreciseSums
"C:/R/R-34~1.3/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet  \
  CMD INSTALL  \
  "C:/Users/James/AppData/Local/Temp/RtmpQF3F1h/devtools17006c0d7a96/nlmixrdevelopment-PreciseSums-70985de"  \
  --library="C:/Users/James/Documents/R/win-library/3.4" --install-tests 

* installing *source* package 'PreciseSums' ...
** libs
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c sum.c -o sum.o
sum.c: In function 'PreciseSums_sum_r':
sum.c:307:48: warning: passing argument 3 of 'PreciseSums_Python_fsum_r' discards 'const' qualifier from pointer target type
     return PreciseSums_Python_fsum_r(input, n, p, m);
                                                ^
sum.c:149:15: note: expected 'double *' but argument is of type 'const double *'
 extern double PreciseSums_Python_fsum_r(double *iterable, int iterable_len, double *p, int m){
               ^
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c prod.c -o prod.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c init.c -o init.o
c:/Rtools/mingw_64/bin/gcc -shared -s -static-libgcc -o PreciseSums.dll tmp.def sum.o prod.o init.o -LC:/R/R-34~1.3/bin/x64 -lR
installing via 'install.libs.R' to C:/Users/James/Documents/R/win-library/3.4/PreciseSums
** R
** tests
** preparing package for lazy loading
** help
*** installing help indices
  converting help for package 'PreciseSums'
    finding HTML links ... done
    fsum                                    html  
    kahanSum                                html  
    neumaierSum                             html  
    pairwiseSum                             html  
    psProd                                  html  
    psSetProd                               html  
    psSetSum                                html  
    psSum                                   html  
** building package indices
** testing if installed package can be loaded
* DONE (PreciseSums)
In R CMD INSTALL
"C:/R/R-34~1.3/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet  \
  CMD INSTALL  \
  "C:/Users/James/AppData/Local/Temp/RtmpQF3F1h/devtools170029587cb/nlmixrdevelopment-RxODE-392e773"  \
  --library="C:/Users/James/Documents/R/win-library/3.4" --install-tests 

ERROR: dependency 'digest' is not available for package 'RxODE'
* removing 'C:/Users/James/Documents/R/win-library/3.4/RxODE'
In R CMD INSTALL
Installation failed: Command failed (1)
> # Preliminaries
> setwd("C:/Users/James/Documents/pharmacometrics/testing")
> rxClean()
Error in rxClean() : could not find function "rxClean"
> library(nlmixr)
Loading required package: nlme
Error: package ‘RxODE’ required by ‘nlmixr’ could not be found
> devtools::install_github("nlmixrdevelopment/RxODE");
Downloading GitHub repo nlmixrdevelopment/RxODE@master
from URL https://api.github.com/repos/nlmixrdevelopment/RxODE/zipball/master
Installing RxODE
Installing 1 package: digest
Installing package into ‘C:/Users/James/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/digest_0.6.15.zip'
Content type 'application/zip' length 175220 bytes (171 KB)
downloaded 171 KB

package ‘digest’ successfully unpacked and MD5 sums checked
Warning: cannot remove prior installation of package ‘digest’

The downloaded binary packages are in
    C:\Users\James\AppData\Local\Temp\RtmpQF3F1h\downloaded_packages
Downloading GitHub repo nlmixrdevelopment/PreciseSums@master
from URL https://api.github.com/repos/nlmixrdevelopment/PreciseSums/zipball/master
Installing PreciseSums
"C:/R/R-34~1.3/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet  \
  CMD INSTALL  \
  "C:/Users/James/AppData/Local/Temp/RtmpQF3F1h/devtools17006bca2838/nlmixrdevelopment-PreciseSums-70985de"  \
  --library="C:/Users/James/Documents/R/win-library/3.4" --install-tests 

* installing *source* package 'PreciseSums' ...
** libs
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c sum.c -o sum.o
sum.c: In function 'PreciseSums_sum_r':
sum.c:307:48: warning: passing argument 3 of 'PreciseSums_Python_fsum_r' discards 'const' qualifier from pointer target type
     return PreciseSums_Python_fsum_r(input, n, p, m);
                                                ^
sum.c:149:15: note: expected 'double *' but argument is of type 'const double *'
 extern double PreciseSums_Python_fsum_r(double *iterable, int iterable_len, double *p, int m){
               ^
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c prod.c -o prod.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c init.c -o init.o
c:/Rtools/mingw_64/bin/gcc -shared -s -static-libgcc -o PreciseSums.dll tmp.def sum.o prod.o init.o -LC:/R/R-34~1.3/bin/x64 -lR
installing via 'install.libs.R' to C:/Users/James/Documents/R/win-library/3.4/PreciseSums
** R
** tests
** preparing package for lazy loading
** help
*** installing help indices
  converting help for package 'PreciseSums'
    finding HTML links ... done
    fsum                                    html  
    kahanSum                                html  
    neumaierSum                             html  
    pairwiseSum                             html  
    psProd                                  html  
    psSetProd                               html  
    psSetSum                                html  
    psSum                                   html  
** building package indices
** testing if installed package can be loaded
* DONE (PreciseSums)
In R CMD INSTALL
"C:/R/R-34~1.3/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet  \
  CMD INSTALL  \
  "C:/Users/James/AppData/Local/Temp/RtmpQF3F1h/devtools1700b7f771c/nlmixrdevelopment-RxODE-392e773"  \
  --library="C:/Users/James/Documents/R/win-library/3.4" --install-tests 

ERROR: dependency 'digest' is not available for package 'RxODE'
* removing 'C:/Users/James/Documents/R/win-library/3.4/RxODE'
In R CMD INSTALL
Installation failed: Command failed (1)
> devtools::install_github("eddelbuettel/digest");
Downloading GitHub repo eddelbuettel/digest@master
from URL https://api.github.com/repos/eddelbuettel/digest/zipball/master
Installing digest
"C:/R/R-34~1.3/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet  \
  CMD INSTALL  \
  "C:/Users/James/AppData/Local/Temp/RtmpQF3F1h/devtools17005dc542/eddelbuettel-digest-d9f40a9"  \
  --library="C:/Users/James/Documents/R/win-library/3.4" --install-tests 

* installing *source* package 'digest' ...
** libs
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c aes.c -o aes.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c crc32.c -o crc32.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c digest.c -o digest.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c init.c -o init.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c md5.c -o md5.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c pmurhash.c -o pmurhash.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c raes.c -o raes.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c sha1.c -o sha1.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c sha2.c -o sha2.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c sha256.c -o sha256.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c xxhash.c -o xxhash.o
c:/Rtools/mingw_64/bin/gcc -shared -s -static-libgcc -o digest.dll tmp.def aes.o crc32.o digest.o init.o md5.o pmurhash.o raes.o sha1.o sha2.o sha256.o xxhash.o -LC:/R/R-34~1.3/bin/x64 -lR
installing to C:/Users/James/Documents/R/win-library/3.4/digest/libs/x64
Warning in file.copy(files, dest, overwrite = TRUE) :
  problem copying .\digest.dll to C:\Users\James\Documents\R\win-library\3.4\digest\libs\x64\digest.dll: Permission denied
** R
** inst
** tests
** preparing package for lazy loading
** help
*** installing help indices
  converting help for package 'digest'
    finding HTML links ... done
    AES                                     html  
    digest                                  html  
    hmac                                    html  
    makeRaw                                 html  
    sha1                                    html  
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (digest)
In R CMD INSTALL
> devtools::install_github("nlmixrdevelopment/RxODE");
Downloading GitHub repo nlmixrdevelopment/RxODE@master
from URL https://api.github.com/repos/nlmixrdevelopment/RxODE/zipball/master
Installing RxODE
Downloading GitHub repo eddelbuettel/digest@master
from URL https://api.github.com/repos/eddelbuettel/digest/zipball/master
Installing digest
"C:/R/R-34~1.3/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet  \
  CMD INSTALL  \
  "C:/Users/James/AppData/Local/Temp/RtmpQF3F1h/devtools170046c52b3f/eddelbuettel-digest-d9f40a9"  \
  --library="C:/Users/James/Documents/R/win-library/3.4" --install-tests 

* installing *source* package 'digest' ...
** libs
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c aes.c -o aes.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c crc32.c -o crc32.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c digest.c -o digest.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c init.c -o init.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c md5.c -o md5.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c pmurhash.c -o pmurhash.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c raes.c -o raes.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c sha1.c -o sha1.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c sha2.c -o sha2.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c sha256.c -o sha256.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c xxhash.c -o xxhash.o
c:/Rtools/mingw_64/bin/gcc -shared -s -static-libgcc -o digest.dll tmp.def aes.o crc32.o digest.o init.o md5.o pmurhash.o raes.o sha1.o sha2.o sha256.o xxhash.o -LC:/R/R-34~1.3/bin/x64 -lR
installing to C:/Users/James/Documents/R/win-library/3.4/digest/libs/x64
Warning in file.copy(files, dest, overwrite = TRUE) :
  problem copying .\digest.dll to C:\Users\James\Documents\R\win-library\3.4\digest\libs\x64\digest.dll: Permission denied
** R
** inst
** tests
** preparing package for lazy loading
** help
*** installing help indices
  converting help for package 'digest'
    finding HTML links ... done
    AES                                     html  
    digest                                  html  
    hmac                                    html  
    makeRaw                                 html  
    sha1                                    html  
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (digest)
In R CMD INSTALL
Downloading GitHub repo nlmixrdevelopment/PreciseSums@master
from URL https://api.github.com/repos/nlmixrdevelopment/PreciseSums/zipball/master
Installing PreciseSums
"C:/R/R-34~1.3/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet  \
  CMD INSTALL  \
  "C:/Users/James/AppData/Local/Temp/RtmpQF3F1h/devtools1700118d3bf3/nlmixrdevelopment-PreciseSums-70985de"  \
  --library="C:/Users/James/Documents/R/win-library/3.4" --install-tests 

* installing *source* package 'PreciseSums' ...
** libs
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c sum.c -o sum.o
sum.c: In function 'PreciseSums_sum_r':
sum.c:307:48: warning: passing argument 3 of 'PreciseSums_Python_fsum_r' discards 'const' qualifier from pointer target type
     return PreciseSums_Python_fsum_r(input, n, p, m);
                                                ^
sum.c:149:15: note: expected 'double *' but argument is of type 'const double *'
 extern double PreciseSums_Python_fsum_r(double *iterable, int iterable_len, double *p, int m){
               ^
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c prod.c -o prod.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c init.c -o init.o
c:/Rtools/mingw_64/bin/gcc -shared -s -static-libgcc -o PreciseSums.dll tmp.def sum.o prod.o init.o -LC:/R/R-34~1.3/bin/x64 -lR
installing via 'install.libs.R' to C:/Users/James/Documents/R/win-library/3.4/PreciseSums
** R
** tests
** preparing package for lazy loading
** help
*** installing help indices
  converting help for package 'PreciseSums'
    finding HTML links ... done
    fsum                                    html  
    kahanSum                                html  
    neumaierSum                             html  
    pairwiseSum                             html  
    psProd                                  html  
    psSetProd                               html  
    psSetSum                                html  
    psSum                                   html  
** building package indices
** testing if installed package can be loaded
* DONE (PreciseSums)
In R CMD INSTALL
"C:/R/R-34~1.3/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet  \
  CMD INSTALL  \
  "C:/Users/James/AppData/Local/Temp/RtmpQF3F1h/devtools170016e6232a/nlmixrdevelopment-RxODE-392e773"  \
  --library="C:/Users/James/Documents/R/win-library/3.4" --install-tests 

* installing *source* package 'RxODE' ...
--------[[begin src/Makevars.win]]--------
CXX_STD     = CXX11
# Add -g for gdb debugging
PKG_LIBS    = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) $(SHLIB_OPENMP_CFLAGS)
PKG_FFLAGS  = $(FPICFLAGS) 
PKG_FCFLAGS = $(FPICFLAGS)
PKG_CFLAGS  = $(SHLIB_OPENMP_CFLAGS)

SOURCES_C = call_dvode.c dop853.c tran.c rprintf.c lincmt.c omegaChol.c init.c par_solve.c cfode.c cfode_static.c common.c corfailure.c correction.c daxpy.c ddot.c dgefa.c dgesl.c dscal.c fnorm.c idamax.c intdy.c lsoda.c methodswitch.c orderswitch.c prja.c scaleh.c solsy.c stoda.c vmnorm.c strdup_printf.c
SOURCES_CPP = RcppExports.cpp util.cpp WinDrive.cpp rxInv.cpp rxData.cpp
SOURCES_FORTAN = dlsoda.f opkda1_abbr.f opkda2.f errmsg.f

OBJECTS = $(SOURCES_C:.c=.o) $(SOURCES_FORTAN:.f=.o) $(SOURCES_CPP:.cpp=.o)
--------[[end src/Makevars.win]]--------
** libs
Warning: this package has a non-empty 'configure.win' file,
so building only the main architecture

c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG  -I"C:/Users/James/Documents/R/win-library/3.4/dparser/include" -I"C:/Users/James/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/James/Documents/R/win-library/3.4/RcppArmadillo/include" -I"C:/Users/James/Documents/R/win-library/3.4/PreciseSums/include"     -fopenmp   -O2 -Wall  -std=gnu99 -mtune=generic -c call_dvode.c -o call_dvode.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG  -I"C:/Users/James/Documents/R/win-library/3.4/dparser/include" -I"C:/Users/James/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/James/Documents/R/win-library/3.4/RcppArmadillo/include" -I"C:/Users/James/Documents/R/win-library/3.4/PreciseSums/include"     -fopenmp   -O2 -Wall  -std=gnu99 -mtune=generic -c dop853.c -o dop853.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG  -I"C:/Users/James/Documents/R/win-library/3.4/dparser/include" -I"C:/Users/James/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/James/Documents/R/win-library/3.4/RcppArmadillo/include" -I"C:/Users/James/Documents/R/win-library/3.4/PreciseSums/include"     -fopenmp   -O2 -Wall  -std=gnu99 -mtune=generic -c tran.c -o tran.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG  -I"C:/Users/James/Documents/R/win-library/3.4/dparser/include" -I"C:/Users/James/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/James/Documents/R/win-library/3.4/RcppArmadillo/include" -I"C:/Users/James/Documents/R/win-library/3.4/PreciseSums/include"     -fopenmp   -O2 -Wall  -std=gnu99 -mtune=generic -c rprintf.c -o rprintf.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG  -I"C:/Users/James/Documents/R/win-library/3.4/dparser/include" -I"C:/Users/James/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/James/Documents/R/win-library/3.4/RcppArmadillo/include" -I"C:/Users/James/Documents/R/win-library/3.4/PreciseSums/include"     -fopenmp   -O2 -Wall  -std=gnu99 -mtune=generic -c lincmt.c -o lincmt.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG  -I"C:/Users/James/Documents/R/win-library/3.4/dparser/include" -I"C:/Users/James/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/James/Documents/R/win-library/3.4/RcppArmadillo/include" -I"C:/Users/James/Documents/R/win-library/3.4/PreciseSums/include"     -fopenmp   -O2 -Wall  -std=gnu99 -mtune=generic -c omegaChol.c -o omegaChol.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG  -I"C:/Users/James/Documents/R/win-library/3.4/dparser/include" -I"C:/Users/James/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/James/Documents/R/win-library/3.4/RcppArmadillo/include" -I"C:/Users/James/Documents/R/win-library/3.4/PreciseSums/include"     -fopenmp   -O2 -Wall  -std=gnu99 -mtune=generic -c init.c -o init.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG  -I"C:/Users/James/Documents/R/win-library/3.4/dparser/include" -I"C:/Users/James/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/James/Documents/R/win-library/3.4/RcppArmadillo/include" -I"C:/Users/James/Documents/R/win-library/3.4/PreciseSums/include"     -fopenmp   -O2 -Wall  -std=gnu99 -mtune=generic -c par_solve.c -o par_solve.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG  -I"C:/Users/James/Documents/R/win-library/3.4/dparser/include" -I"C:/Users/James/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/James/Documents/R/win-library/3.4/RcppArmadillo/include" -I"C:/Users/James/Documents/R/win-library/3.4/PreciseSums/include"     -fopenmp   -O2 -Wall  -std=gnu99 -mtune=generic -c cfode.c -o cfode.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG  -I"C:/Users/James/Documents/R/win-library/3.4/dparser/include" -I"C:/Users/James/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/James/Documents/R/win-library/3.4/RcppArmadillo/include" -I"C:/Users/James/Documents/R/win-library/3.4/PreciseSums/include"     -fopenmp   -O2 -Wall  -std=gnu99 -mtune=generic -c cfode_static.c -o cfode_static.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG  -I"C:/Users/James/Documents/R/win-library/3.4/dparser/include" -I"C:/Users/James/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/James/Documents/R/win-library/3.4/RcppArmadillo/include" -I"C:/Users/James/Documents/R/win-library/3.4/PreciseSums/include"     -fopenmp   -O2 -Wall  -std=gnu99 -mtune=generic -c common.c -o common.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG  -I"C:/Users/James/Documents/R/win-library/3.4/dparser/include" -I"C:/Users/James/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/James/Documents/R/win-library/3.4/RcppArmadillo/include" -I"C:/Users/James/Documents/R/win-library/3.4/PreciseSums/include"     -fopenmp   -O2 -Wall  -std=gnu99 -mtune=generic -c corfailure.c -o corfailure.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG  -I"C:/Users/James/Documents/R/win-library/3.4/dparser/include" -I"C:/Users/James/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/James/Documents/R/win-library/3.4/RcppArmadillo/include" -I"C:/Users/James/Documents/R/win-library/3.4/PreciseSums/include"     -fopenmp   -O2 -Wall  -std=gnu99 -mtune=generic -c correction.c -o correction.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG  -I"C:/Users/James/Documents/R/win-library/3.4/dparser/include" -I"C:/Users/James/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/James/Documents/R/win-library/3.4/RcppArmadillo/include" -I"C:/Users/James/Documents/R/win-library/3.4/PreciseSums/include"     -fopenmp   -O2 -Wall  -std=gnu99 -mtune=generic -c daxpy.c -o daxpy.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG  -I"C:/Users/James/Documents/R/win-library/3.4/dparser/include" -I"C:/Users/James/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/James/Documents/R/win-library/3.4/RcppArmadillo/include" -I"C:/Users/James/Documents/R/win-library/3.4/PreciseSums/include"     -fopenmp   -O2 -Wall  -std=gnu99 -mtune=generic -c ddot.c -o ddot.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG  -I"C:/Users/James/Documents/R/win-library/3.4/dparser/include" -I"C:/Users/James/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/James/Documents/R/win-library/3.4/RcppArmadillo/include" -I"C:/Users/James/Documents/R/win-library/3.4/PreciseSums/include"     -fopenmp   -O2 -Wall  -std=gnu99 -mtune=generic -c dgefa.c -o dgefa.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG  -I"C:/Users/James/Documents/R/win-library/3.4/dparser/include" -I"C:/Users/James/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/James/Documents/R/win-library/3.4/RcppArmadillo/include" -I"C:/Users/James/Documents/R/win-library/3.4/PreciseSums/include"     -fopenmp   -O2 -Wall  -std=gnu99 -mtune=generic -c dgesl.c -o dgesl.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG  -I"C:/Users/James/Documents/R/win-library/3.4/dparser/include" -I"C:/Users/James/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/James/Documents/R/win-library/3.4/RcppArmadillo/include" -I"C:/Users/James/Documents/R/win-library/3.4/PreciseSums/include"     -fopenmp   -O2 -Wall  -std=gnu99 -mtune=generic -c dscal.c -o dscal.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG  -I"C:/Users/James/Documents/R/win-library/3.4/dparser/include" -I"C:/Users/James/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/James/Documents/R/win-library/3.4/RcppArmadillo/include" -I"C:/Users/James/Documents/R/win-library/3.4/PreciseSums/include"     -fopenmp   -O2 -Wall  -std=gnu99 -mtune=generic -c fnorm.c -o fnorm.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG  -I"C:/Users/James/Documents/R/win-library/3.4/dparser/include" -I"C:/Users/James/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/James/Documents/R/win-library/3.4/RcppArmadillo/include" -I"C:/Users/James/Documents/R/win-library/3.4/PreciseSums/include"     -fopenmp   -O2 -Wall  -std=gnu99 -mtune=generic -c idamax.c -o idamax.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG  -I"C:/Users/James/Documents/R/win-library/3.4/dparser/include" -I"C:/Users/James/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/James/Documents/R/win-library/3.4/RcppArmadillo/include" -I"C:/Users/James/Documents/R/win-library/3.4/PreciseSums/include"     -fopenmp   -O2 -Wall  -std=gnu99 -mtune=generic -c intdy.c -o intdy.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG  -I"C:/Users/James/Documents/R/win-library/3.4/dparser/include" -I"C:/Users/James/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/James/Documents/R/win-library/3.4/RcppArmadillo/include" -I"C:/Users/James/Documents/R/win-library/3.4/PreciseSums/include"     -fopenmp   -O2 -Wall  -std=gnu99 -mtune=generic -c lsoda.c -o lsoda.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG  -I"C:/Users/James/Documents/R/win-library/3.4/dparser/include" -I"C:/Users/James/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/James/Documents/R/win-library/3.4/RcppArmadillo/include" -I"C:/Users/James/Documents/R/win-library/3.4/PreciseSums/include"     -fopenmp   -O2 -Wall  -std=gnu99 -mtune=generic -c methodswitch.c -o methodswitch.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG  -I"C:/Users/James/Documents/R/win-library/3.4/dparser/include" -I"C:/Users/James/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/James/Documents/R/win-library/3.4/RcppArmadillo/include" -I"C:/Users/James/Documents/R/win-library/3.4/PreciseSums/include"     -fopenmp   -O2 -Wall  -std=gnu99 -mtune=generic -c orderswitch.c -o orderswitch.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG  -I"C:/Users/James/Documents/R/win-library/3.4/dparser/include" -I"C:/Users/James/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/James/Documents/R/win-library/3.4/RcppArmadillo/include" -I"C:/Users/James/Documents/R/win-library/3.4/PreciseSums/include"     -fopenmp   -O2 -Wall  -std=gnu99 -mtune=generic -c prja.c -o prja.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG  -I"C:/Users/James/Documents/R/win-library/3.4/dparser/include" -I"C:/Users/James/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/James/Documents/R/win-library/3.4/RcppArmadillo/include" -I"C:/Users/James/Documents/R/win-library/3.4/PreciseSums/include"     -fopenmp   -O2 -Wall  -std=gnu99 -mtune=generic -c scaleh.c -o scaleh.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG  -I"C:/Users/James/Documents/R/win-library/3.4/dparser/include" -I"C:/Users/James/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/James/Documents/R/win-library/3.4/RcppArmadillo/include" -I"C:/Users/James/Documents/R/win-library/3.4/PreciseSums/include"     -fopenmp   -O2 -Wall  -std=gnu99 -mtune=generic -c solsy.c -o solsy.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG  -I"C:/Users/James/Documents/R/win-library/3.4/dparser/include" -I"C:/Users/James/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/James/Documents/R/win-library/3.4/RcppArmadillo/include" -I"C:/Users/James/Documents/R/win-library/3.4/PreciseSums/include"     -fopenmp   -O2 -Wall  -std=gnu99 -mtune=generic -c stoda.c -o stoda.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG  -I"C:/Users/James/Documents/R/win-library/3.4/dparser/include" -I"C:/Users/James/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/James/Documents/R/win-library/3.4/RcppArmadillo/include" -I"C:/Users/James/Documents/R/win-library/3.4/PreciseSums/include"     -fopenmp   -O2 -Wall  -std=gnu99 -mtune=generic -c vmnorm.c -o vmnorm.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG  -I"C:/Users/James/Documents/R/win-library/3.4/dparser/include" -I"C:/Users/James/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/James/Documents/R/win-library/3.4/RcppArmadillo/include" -I"C:/Users/James/Documents/R/win-library/3.4/PreciseSums/include"     -fopenmp   -O2 -Wall  -std=gnu99 -mtune=generic -c strdup_printf.c -o strdup_printf.o
c:/Rtools/mingw_64/bin/gfortran       -O2  -mtune=generic -c dlsoda.f -o dlsoda.o
c:/Rtools/mingw_64/bin/gfortran       -O2  -mtune=generic -c opkda1_abbr.f -o opkda1_abbr.o
c:/Rtools/mingw_64/bin/gfortran       -O2  -mtune=generic -c opkda2.f -o opkda2.o
c:/Rtools/mingw_64/bin/gfortran       -O2  -mtune=generic -c errmsg.f -o errmsg.o
c:/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/R/R-34~1.3/include" -DNDEBUG  -I"C:/Users/James/Documents/R/win-library/3.4/dparser/include" -I"C:/Users/James/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/James/Documents/R/win-library/3.4/RcppArmadillo/include" -I"C:/Users/James/Documents/R/win-library/3.4/PreciseSums/include"        -O2 -Wall  -mtune=generic -c RcppExports.cpp -o RcppExports.o
c:/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/R/R-34~1.3/include" -DNDEBUG  -I"C:/Users/James/Documents/R/win-library/3.4/dparser/include" -I"C:/Users/James/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/James/Documents/R/win-library/3.4/RcppArmadillo/include" -I"C:/Users/James/Documents/R/win-library/3.4/PreciseSums/include"        -O2 -Wall  -mtune=generic -c util.cpp -o util.o
c:/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/R/R-34~1.3/include" -DNDEBUG  -I"C:/Users/James/Documents/R/win-library/3.4/dparser/include" -I"C:/Users/James/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/James/Documents/R/win-library/3.4/RcppArmadillo/include" -I"C:/Users/James/Documents/R/win-library/3.4/PreciseSums/include"        -O2 -Wall  -mtune=generic -c WinDrive.cpp -o WinDrive.o
c:/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/R/R-34~1.3/include" -DNDEBUG  -I"C:/Users/James/Documents/R/win-library/3.4/dparser/include" -I"C:/Users/James/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/James/Documents/R/win-library/3.4/RcppArmadillo/include" -I"C:/Users/James/Documents/R/win-library/3.4/PreciseSums/include"        -O2 -Wall  -mtune=generic -c rxInv.cpp -o rxInv.o
c:/Rtools/mingw_64/bin/g++  -std=gnu++11 -I"C:/R/R-34~1.3/include" -DNDEBUG  -I"C:/Users/James/Documents/R/win-library/3.4/dparser/include" -I"C:/Users/James/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/James/Documents/R/win-library/3.4/RcppArmadillo/include" -I"C:/Users/James/Documents/R/win-library/3.4/PreciseSums/include"        -O2 -Wall  -mtune=generic -c rxData.cpp -o rxData.o
c:/Rtools/mingw_64/bin/g++ -shared -s -static-libgcc -o RxODE.dll tmp.def call_dvode.o dop853.o tran.o rprintf.o lincmt.o omegaChol.o init.o par_solve.o cfode.o cfode_static.o common.o corfailure.o correction.o daxpy.o ddot.o dgefa.o dgesl.o dscal.o fnorm.o idamax.o intdy.o lsoda.o methodswitch.o orderswitch.o prja.o scaleh.o solsy.o stoda.o vmnorm.o strdup_printf.o dlsoda.o opkda1_abbr.o opkda2.o errmsg.o RcppExports.o util.o WinDrive.o rxInv.o rxData.o -LC:/R/R-34~1.3/bin/x64 -lRlapack -LC:/R/R-34~1.3/bin/x64 -lRblas -lgfortran -lm -lquadmath -fopenmp -lgfortran -lm -lquadmath -LC:/R/R-34~1.3/bin/x64 -lR
installing via 'install.libs.R' to C:/Users/James/Documents/R/win-library/3.4/RxODE
** R
** demo
** inst
** tests
** preparing package for lazy loading
** help
*** installing help indices
  converting help for package 'RxODE'
    finding HTML links ... done
    RxODE                                   html  
    add.dosing                              html  
    add.sampling                            html  
    coef.RxODE                              html  
    cvPost                                  html  
    eventTable                              html  
    findLhs                                 html  
    genShinyApp.template                    html  
    is.rxSolve                              html  
    plus-.rxSolve                           html  
    predict.RxODE                           html  
    print.RxODE                             html  
    print.rxCoef                            html  
    print.rxCoefSolve                       html  
    print.rxDll                             html  
    reexports                               html  
Rd warning: C:/Users/James/AppData/Local/Temp/RtmpQF3F1h/devtools170016e6232a/nlmixrdevelopment-RxODE-392e773/man/reexports.Rd:14: missing file link '%>%'
    rinvchisq                               html  
    rxAddReturn                             html  
    rxAssignPtr                             html  
    rxBlockZeros                            html  
    rxC                                     html  
    rxCat                                   html  
    rxChain                                 html  
    rxChain2                                html  
    rxClean                                 html  
    rxCompile                               html  
    rxCondition                             html  
    rxCores                                 html  
    rxCout                                  html  
    rxCoutEcho                              html  
    rxDataParSetup                          html  
    rxDelete                                html  
    rxDfdy                                  html  
    rxDll                                   html  
    rxDynLoad                               html  
    rxDynUnload                             html  
    rxExpandIfElse                          html  
    rxForget                                html  
    rxGetModel                              html  
    rxGetRxODE                              html  
    rxInits                                 html  
    rxInv                                   html  
    rxInvWishartVar                         html  
    rxIs                                    html  
    rxIsCurrent                             html  
    rxIsLoaded                              html  
    rxLhs                                   html  
    rxLinCmtTrans                           html  
    rxLogifyModel                           html  
    rxMd5                                   html  
    rxModelVars                             html  
    rxModels_                               html  
    rxNorm                                  html  
    rxOptions                               html  
    rxParams                                html  
    rxParseErr                              html  
    rxParsePk                               html  
    rxParsePred                             html  
    rxPermissive                            html  
    rxPhysicalDrives                        html  
    rxPrint                                 html  
    rxReload                                html  
    rxReq                                   html  
    rxRmIni                                 html  
    rxRmJac                                 html  
    rxRmPrint                               html  
    rxRmSens                                html  
    rxRtoolsBaseWin                         html  
    rxSetProd                               html  
    rxSetSum                                html  
    rxSetupIni                              html  
    rxSetupScale                            html  
    rxSimThetaOmega                         html  
    rxSolve                                 html  
    rxSplitLines                            html  
    rxSplitPlusQ                            html  
    rxState                                 html  
    rxSumProdModel                          html  
    rxSyPyAddVars                           html  
    rxSymDiag                               html  
    rxSymInv                                html  
    rxSymInvChol                            html  
    rxSymInvCholCreate                      html  
    rxSymInvCholN                           html  
    rxSymInvCreate                          html  
    rxSymPy                                 html  
    rxSymPyClean                            html  
    rxSymPyClear                            html  
    rxSymPyDfDy                             html  
    rxSymPyExists                           html  
    rxSymPyExpand                           html  
    rxSymPyFix                              html  
    rxSymPyFunctions                        html  
    rxSymPyJacobian                         html  
    rxSymPyReserved                         html  
    rxSymPySensitivity                      html  
    rxSymPySetup                            html  
    rxSymPySetupIf                          html  
    rxSymPySetupPred                        html  
    rxSymPyVars                             html  
    rxSymPyVersion                          html  
    rxSympyExec                             html  
    rxSympyStart                            html  
    rxSyncOptions                           html  
    rxThetaEta                              html  
    rxToSymPy                               html  
    rxTrans                                 html  
    rxValidate                              html  
    rxVersion                               html  
    rxWinPythonSetup                        html  
    rxWinRtoolsPath                         html  
    rxWinSetup                              html  
    solve.RxODE                             html  
    summary.RxODE                           html  
    summary.rxDll                           html  
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (RxODE)
In R CMD INSTALL
> remove.packages("RxODE_old", lib="~/R/win-library/3.4")
Error in remove.packages : there is no package called ‘RxODE_old’
> rxVersion(echo=TRUE)
Error in rxVersion(echo = TRUE) : could not find function "rxVersion"
> getwd()
[1] "C:/Users/James/Documents/pharmacometrics/testing"
> library(nlmixr)
Loading required package: RxODE
> rxVersion(echo=TRUE)
  _____         ____  _____  ______
 |  __ \       / __ \|  __ \|  ____| 0.7-0
 | |__) |__  _| |  | | |  | | |__
 |  _  / \ \/ / |  | | |  | |  __|
 | | \ \  >  <| |__| | |__| | |____
 |_|  \_\/_/\_\\____/|_____/|______|
> ls()
character(0)
> system2(dir())
Warning message:
running command '"first_output.txt" "rx_3875b459ce859fab1fe06ac38182270c.inv" "rx_65a85bb09305cd60efe9d43bffa8752d.dll.prd" "rx_920cdb7f8c8c7b5e42b1a8db66863398_x64.c" "rx_920cdb7f8c8c7b5e42b1a8db66863398_x64.dll" "second_output.txt" "third_output.txt"' had status 127 
> rxClean()
[1] TRUE
> system2(dir())
Warning message:
running command '"first_output.txt" "second_output.txt" "third_output.txt"' had status 127 
> 
> 
> # Now back to testing if object x appears, using RxODE v. 0.7.
> t
function (x) 
UseMethod("t")
<bytecode: 0x000000002510a1c8>
<environment: namespace:base>
> # (Ignore above typo.)
> str(theo_sd)  # like Theoph but with ID instead of Subject, also other NONMEM-like
'data.frame':   144 obs. of  7 variables:
 $ ID  : int  1 1 1 1 1 1 1 1 1 1 ...
 $ TIME: num  0 0 0.25 0.57 1.12 2.02 3.82 5.1 7.03 9.05 ...
 $ DV  : num  0 0.74 2.84 6.57 10.5 9.66 8.58 8.36 7.47 6.89 ...
 $ AMT : num  4.02 0 0 0 0 0 0 0 0 0 ...
 $ EVID: int  101 0 0 0 0 0 0 0 0 0 ...
 $ CMT : int  1 2 2 2 2 2 2 2 2 2 ...
 $ WT  : num  79.6 79.6 79.6 79.6 79.6 79.6 79.6 79.6 79.6 79.6 ...
> # 'uif' for Unified Interface Function, 1 compartment, lin for linCmt()
> uif.1cm.lin <- function() {
+   ini({
+     logtcl <- -3.2      # log typical value Cl (L/hr)
+     logtka <-  0.5      # log typical value Ka (1/hr)
+     logtv  <- -1        # log typical value V  (L)
+     
+     # error model
+     add.err <- 0.1
+     
+     # Initial estimates for IIV variances
+     # Labels work for single parameters.
+     eta.cl ~ 2
+     eta.ka ~ 1    ## BSV Ka
+     eta.v  ~ 1
+   })
+   model({
+     cl <- exp(logtcl + eta.cl)
+     ka <- exp(logtka + eta.ka)
+     v  <- exp(logtv  + eta.v)
+     linCmt() ~ add(add.err)
+   })
+ }
> # NLME fittings
> 
> fit.nlme.1cm.lin.theo_sd     <- nlmixr(uif.1cm.lin, theo_sd, est="nlme")

**Iteration 1
LME step: Loglik: -182.2318, nlminb iterations: 1
reStruct  parameters:
      ID1       ID2       ID3 
1.0022617 0.2783009 2.0758984 
PNLS step: RSS =  63.14922 
 fixed effects: -3.211937  0.4479979  -0.7859318  
 iterations: 7 
Convergence crit. (must all become <= tolerance = 1e-05):
   fixed reStruct 
0.272375 3.267309 

**Iteration 2
LME step: Loglik: -179.291, nlminb iterations: 9
reStruct  parameters:
       ID1        ID2        ID3 
0.96385527 0.08333435 1.63552295 
PNLS step: RSS =  63.28221 
 fixed effects: -3.211535  0.4441505  -0.7863391  
 iterations: 7 
Convergence crit. (must all become <= tolerance = 1e-05):
      fixed    reStruct 
0.008662381 0.172135330 

**Iteration 3
LME step: Loglik: -179.3381, nlminb iterations: 8
reStruct  parameters:
       ID1        ID2        ID3 
0.96129928 0.07085834 1.63885629 
PNLS step: RSS =  63.2196 
 fixed effects: -3.211732  0.4458486  -0.7861743  
 iterations: 7 
Convergence crit. (must all become <= tolerance = 1e-05):
      fixed    reStruct 
0.003808629 0.082919683 

**Iteration 4
LME step: Loglik: -179.3201, nlminb iterations: 7
reStruct  parameters:
       ID1        ID2        ID3 
0.96243507 0.07618717 1.63736945 
PNLS step: RSS =  63.22991 
 fixed effects: -3.211823  0.4451494  -0.7862432  
 iterations: 7 
Convergence crit. (must all become <= tolerance = 1e-05):
      fixed    reStruct 
0.001570583 0.013884126 

**Iteration 5
LME step: Loglik: -179.3277, nlminb iterations: 4
reStruct  parameters:
       ID1        ID2        ID3 
0.96197111 0.07396744 1.63796900 
PNLS step: RSS =  63.24112 
 fixed effects: -3.211722  0.4454457  -0.7862145  
 iterations: 6 
Convergence crit. (must all become <= tolerance = 1e-05):
       fixed     reStruct 
0.0006651255 0.0147544693 

**Iteration 6
LME step: Loglik: -179.3246, nlminb iterations: 1
reStruct  parameters:
       ID1        ID2        ID3 
0.96215433 0.07487426 1.63772430 
PNLS step: RSS =  63.24112 
 fixed effects: -3.211722  0.4454457  -0.7862145  
 iterations: 1 
Convergence crit. (must all become <= tolerance = 1e-05):
       fixed     reStruct 
0.000000e+00 3.910435e-10 
Using sympy via SnakeCharmR
C:/RTools/3.4/mingw_64/bin/gcc  -I"C:/R/R-34~1.3/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c rx_efdbfa7a763f3a3754a7df0bc7f9944b_x64.c -o rx_efdbfa7a763f3a3754a7df0bc7f9944b_x64.o
C:/RTools/3.4/mingw_64/bin/gcc -shared -s -static-libgcc -o rx_efdbfa7a763f3a3754a7df0bc7f9944b_x64.dll tmp.def rx_efdbfa7a763f3a3754a7df0bc7f9944b_x64.o -LC:/R/R-34~1.3/bin/x64 -lRblas -LC:/R/R-34~1.3/bin/x64 -lRlapack -lgfortran -lm -lquadmath -LC:/R/R-34~1.3/bin/x64 -lR
The model has been setup to calculate residuals.
It will be cached for future runs.
Diagonal form: sqrt
     [,1]
[1,]    1
Calculate symbolic inverse...done
Calculate symbolic determinant of inverse...done
Calculate d(Omega)/d(Est) and d(Omega^-1)/d(Est)...
.0
...done.
Error in RxODE_focei_finalize_llik(env) : 
  Not compatible with requested type: [type=NULL; target=double].
In addition: Warning message:
In nlmixrUI.nlme.var(obj) :
  Initial condition for additive error ignored with nlme
After Error:
## Hessian:
##             [,1]        [,2]        [,3]
## [1,] -9586315175 -9586886574 -9585393585
## [2,] -9586886574 -9587458024 -9585964944
## [3,] -9585393585 -9585964944 -9584472154
## log.det.H.neg.5:
## [1] 14.92431
## log.det.OMGAinv.5:
## [1] 3.778524
> # This output now shows an error that the previous version of RxODE did not.
> # It also shows more information after the error.
> # Object x did not appear, unlike with the earlier version of RxODE.
> ls()
[1] "uif.1cm.lin"
> # Where is object fit.nlme.1cm.lin.theo_sd?
> # Would x have appeared if fit.nlme.1cm.lin.theo_sd had appeared?
mattfidler commented 6 years ago

I tried your code again and could not reproduce, but then I noticed I forgot to push some updates for nlmixr's handling of residuals (which was where you were getting the error).

You probably won't get the error if you update nlmixr:

devtools::install_github("nlmixrdevelopment/nlmixr")
JSC67 commented 6 years ago

Thank-you! I re-installed nlmixr to the latest and now object x does not appear after using rxClean(). Using RxODE v. 0.7 too.

mattfidler commented 6 years ago

Great!