StatisticsNZ/demest

Error in installation of the package "demest"

JohannesTan opened this issue · 4 comments

Thank you for publication of this useful book, BDEF! I am looking forward to reading this.

I have an installation problem of a package, aIthough I found the same issue which is closed, #1.
I could install all the packages for BDEF except for "demest."

In the line 1083 in 'helper-initial-priors.R,' re-encoding cannot be done...(I translated the error message from Japanese into English).

Codes and messages are as follows. Thank you!

> library(devtools)
> install_github("statisticsnz/demest")
Downloading GitHub repo statisticsnz/demest@master
√  checking for file 'C:\Users\yohei\AppData\Local\Temp\Rtmpg9p41Y\remotes5098440065f0\StatisticsNZ-demest-cf8f8a1/DESCRIPTION' ... 
-  preparing 'demest': (1.1s)
√  checking DESCRIPTION meta-information ... 
-  cleaning src
-  checking for LF line-endings in source and make files and shell scripts (470ms)
-  checking for empty or unneeded directories
   Removed empty directory 'demest/under_construction'
-  building 'demest_0.0.0.95.tar.gz'
   
* installing *source* package 'demest' ...
** libs
C:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-35~1.3/include" -DNDEBUG  -I"C:/R/R-3.5.3/library/dembase/include"        -O2 -Wall  -std=gnu99 -mtune=generic -c Combined-methods.c -o Combined-methods.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-35~1.3/include" -DNDEBUG  -I"C:/R/R-3.5.3/library/dembase/include"        -O2 -Wall  -std=gnu99 -mtune=generic -c DemographicArray-methods.c -o DemographicArray-methods.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-35~1.3/include" -DNDEBUG  -I"C:/R/R-3.5.3/library/dembase/include"        -O2 -Wall  -std=gnu99 -mtune=generic -c Model-methods.c -o Model-methods.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-35~1.3/include" -DNDEBUG  -I"C:/R/R-3.5.3/library/dembase/include"        -O2 -Wall  -std=gnu99 -mtune=generic -c Prior-methods.c -o Prior-methods.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-35~1.3/include" -DNDEBUG  -I"C:/R/R-3.5.3/library/dembase/include"        -O2 -Wall  -std=gnu99 -mtune=generic -c helper-functions.c -o helper-functions.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-35~1.3/include" -DNDEBUG  -I"C:/R/R-3.5.3/library/dembase/include"        -O2 -Wall  -std=gnu99 -mtune=generic -c init.c -o init.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-35~1.3/include" -DNDEBUG  -I"C:/R/R-3.5.3/library/dembase/include"        -O2 -Wall  -std=gnu99 -mtune=generic -c iterators-methods.c -o iterators-methods.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-35~1.3/include" -DNDEBUG  -I"C:/R/R-3.5.3/library/dembase/include"        -O2 -Wall  -std=gnu99 -mtune=generic -c mapping-functions.c -o mapping-functions.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-35~1.3/include" -DNDEBUG  -I"C:/R/R-3.5.3/library/dembase/include"        -O2 -Wall  -std=gnu99 -mtune=generic -c update-account.c -o update-account.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-35~1.3/include" -DNDEBUG  -I"C:/R/R-3.5.3/library/dembase/include"        -O2 -Wall  -std=gnu99 -mtune=generic -c update-nongeneric.c -o update-nongeneric.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/R/R-35~1.3/include" -DNDEBUG  -I"C:/R/R-3.5.3/library/dembase/include"        -O2 -Wall  -std=gnu99 -mtune=generic -c updateBetaAndPriorBeta.c -o updateBetaAndPriorBeta.o
C:/Rtools/mingw_64/bin/gcc -shared -s -static-libgcc -o demest.dll tmp.def Combined-methods.o DemographicArray-methods.o Model-methods.o Prior-methods.o helper-functions.o init.o iterators-methods.o mapping-functions.o update-account.o update-nongeneric.o updateBetaAndPriorBeta.o -LC:/R/R-35~1.3/bin/x64 -lRlapack -LC:/R/R-35~1.3/bin/x64 -lRblas -lgfortran -lm -lquadmath -LC:/R/R-35~1.3/bin/x64 -lR
installing to C:/R/R-3.5.3/library/demest/libs/x64
** R
Error :  (警告から変換されました)  'helper-initial-priors.R' (1083行) を再エンコード出来ません  
ERROR: unable to collate and parse R files for package 'demest'
* removing 'C:/R/R-3.5.3/library/demest'
In R CMD INSTALL
Error in i.p(...) : 
  (converted from warning) installation of package ‘C:/Users/yohei/AppData/Local/Temp/Rtmpg9p41Y/file509847df43fd/demest_0.0.0.95.tar.gz’ had non-zero exit status

Hi John

Thank you for your quick reply!
I've installed "demest" successfully after your fix.
I appreciate it!

Hurray!! Glad it worked.

Thanks for your very informative bug report. The problem with encoding was very subtle, and I would never have found it without your help.

My pleasure!