I try to install it on my Windows 10 laptop, but I found the error when I ran the following code in Rstudio.
Downloading GitHub repo Westat-Transportation/summarizeNHTS@master
✓ checking for file 'C:\Users\rqbb\AppData\Local\Temp\RtmpqSBa8H\remotes2a8420e70f8\Westat-Transportation-summarizeNHTS-02ceacc/DESCRIPTION' (359ms)
─ preparing 'summarizeNHTS': (1.7s)
✓ checking DESCRIPTION meta-information ...
─ cleaning src
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ looking to see if a 'data/datalist' file should be added
─ building 'summarizeNHTS_0.0.0.9000.tar.gz' (1.3s)
Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, :
storing paths of more than 100 bytes is not portable:
'summarizeNHTS/inst/multi_year_report_generator/derived variable files/2001/derived_variable_config.csv'
Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, :
storing paths of more than 100 bytes is not portable:
'summarizeNHTS/inst/multi_year_report_generator/derived variable files/2009/derived_variable_config.csv'
Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, :
storing paths of more than 100 bytes is not portable:
'summarizeNHTS/inst/multi_year_report_generator/derived variable files/2017/derived_variable_config.csv'
Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L, :
storing paths of more than 100 bytes is not portable:
'summarizeNHTS/inst/tutorials/workshop/resources/derived_variables/derived_variable_config(example).csv'
Installing package into ‘C:/Users/rqbb/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
* installing *source* package 'summarizeNHTS' ...
** using staged installation
** libs
*** arch - i386
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-36~1.2/include" -DNDEBUG -I"C:/Program Files/R/R-3.6.2/library/Rcpp/include" -O2 -Wall -mtune=generic -c RcppExports.cpp -o RcppExports.o
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-36~1.2/include" -DNDEBUG -I"C:/Program Files/R/R-3.6.2/library/Rcpp/include" -O2 -Wall -mtune=generic -c cpp_helper_functions.cpp -o cpp_helper_functions.o
cpp_helper_functions.cpp: In function 'double Rcpp_wgtmed(Rcpp::NumericVector, Rcpp::NumericVector)':
cpp_helper_functions.cpp:21:59: error: no matching function for call to 'make_pair(Rcpp::traits::storage_type<14>::type&, Rcpp::traits::storage_type<14>::type&)'
vals[i] = std::make_pair<double, double>(x[i], wgts[i]);
^
cpp_helper_functions.cpp:21:59: note: candidate is:
In file included from C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/utility:70:0,
from C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/unordered_map:38,
from C:/Program Files/R/R-3.6.2/library/Rcpp/include/Rcpp/platform/compiler.h:153,
from C:/Program Files/R/R-3.6.2/library/Rcpp/include/Rcpp/r/headers.h:67,
from C:/Program Files/R/R-3.6.2/library/Rcpp/include/RcppCommon.h:29,
from C:/Program Files/R/R-3.6.2/library/Rcpp/include/Rcpp.h:27,
from cpp_helper_functions.cpp:1:
C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/bits/stl_pair.h:276:5: note: template<class _T1, class _T2> constexpr std::pair<typename std::__decay_and_strip<_Tp>::__type, typename std::__decay_and_strip<_T2>::__type> std::make_pair(_T1&&, _T2&&)
make_pair(_T1&& __x, _T2&& __y)
^
C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/bits/stl_pair.h:276:5: note: template argument deduction/substitution failed:
cpp_helper_functions.cpp:21:59: note: cannot convert 'x.Rcpp::Vector<RTYPE, StoragePolicy>::operator[]<14, Rcpp::PreserveStorage>(i)' (type 'Rcpp::traits::storage_type<14>::type {aka double}') to type 'double&&'
vals[i] = std::make_pair<double, double>(x[i], wgts[i]);
^
make: *** [C:/PROGRA~1/R/R-36~1.2/etc/i386/Makeconf:215: cpp_helper_functions.o] Error 1
ERROR: compilation failed for package 'summarizeNHTS'
* removing 'C:/Users/rqbb/Documents/R/win-library/3.6/summarizeNHTS'
error: Failed to install 'summarizeNHTS' from GitHub:
installation of package ‘C:/Users/rqbb/AppData/Local/Temp/RtmpqSBa8H/file2a8472186f1/summarizeNHTS_0.0.0.9000.tar.gz’ had non-zero exit status
I am sure that I followed the Install Instructions, installed the latest version of R, Rtools and Rstudio.
I don't know why it doesn't work.
My OS is Windows 10 professional, version 1903.
I will be very appreciate if you could provide any help.