Error in re-building vignettes:
  ...
Warning in engine$weave(file, quiet = quiet, encoding = enc) :
  Pandoc (>= 1.12.3) and/or pandoc-citeproc not available. Falling back to R Markdown v1.
Error in new_CppObject_xp(fields$.module, fields$.pointer, ...) : 
  no valid constructor available for the argument list
trying deprecated constructor; please alert package maintainer
Error in new_CppObject_xp(fields$.module, fields$.pointer, ...) : 
  no valid constructor available for the argument list
trying deprecated constructor; please alert package maintainer
`stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
`stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
`stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
`stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
`stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
`stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
Warning in engine$weave(file, quiet = quiet, encoding = enc) :
  Pandoc (>= 1.12.3) and/or pandoc-citeproc not available. Falling back to R Markdown v1.
Error in new_CppObject_xp(fields$.module, fields$.pointer, ...) : 
  no valid constructor available for the argument list
`stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
`stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
`stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
Warning in engine$weave(file, quiet = quiet, encoding = enc) :
  Pandoc (>= 1.12.3) and/or pandoc-citeproc not available. Falling back to R Markdown v1.
Creating a 'stanmodel' object schools_mod_cp
Warning: running command '/home/ripley/R/cc/bin/R CMD SHLIB file6ad5727e28e1.cpp 2> file6ad5727e28e1.cpp.err.txt' had status 1 and error message 'Illegal seek'
"/home/ripley/R/Lib32/StanHeaders/include/stan/math/memory/stack_alloc.hpp", line 39: Error: The function "malloc" must have a prototype.
"/home/ripley/R/Lib32/StanHeaders/include/stan/math/memory/stack_alloc.hpp", line 39: Error: Using static_cast to convert from int to char* not allowed.
"/home/ripley/R/Lib32/StanHeaders/include/stan/math/memory/stack_alloc.hpp", line 147: Error: The function "free" must have a prototype.
"/home/ripley/R/Lib32/StanHeaders/include/stan/math/memory/stack_alloc.hpp", line 234: Error: The function "free" must have a prototype.
"/home/ripley/R/Lib32/BH/include/boost/config/compiler/sunpro_cc.hpp", line 117: Warning (Anachronism): Attempt to redefine BOOST_NO_CXX11_RVALUE_REFERENCES without using #undef.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/arch/CUDA/Half.h", line 391: Error: expf is not a member of file level.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/arch/CUDA/Half.h", line 397: Error: logf is not a member of file level.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/arch/CUDA/Half.h", line 404: Error: log10f is not a member of file level.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/arch/CUDA/Half.h", line 407: Error: sqrtf is not a member of file level.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/arch/CUDA/Half.h", line 410: Error: powf is not a member of file level.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/arch/CUDA/Half.h", line 413: Error: sinf is not a member of file level.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/arch/CUDA/Half.h", line 416: Error: cosf is not a member of file level.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/arch/CUDA/Half.h", line 419: Error: tanf is not a member of file level.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/arch/CUDA/Half.h", line 422: Error: tanhf is not a member of file level.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/arch/CUDA/Half.h", line 425: Error: floorf is not a member of file level.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/arch/CUDA/Half.h", line 428: Error: ceilf is not a member of file level.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/arch/CUDA/Half.h", line 509: Error: expf is not a member of file level.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/arch/CUDA/Half.h", line 515: Error: logf is not a member of file level.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/arch/CUDA/Half.h", line 519: Error: sqrtf is not a member of file level.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/arch/CUDA/Half.h", line 522: Error: powf is not a member of file level.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/arch/CUDA/Half.h", line 525: Error: floorf is not a member of file level.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/arch/CUDA/Half.h", line 528: Error: ceilf is not a member of file level.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/DenseCoeffsBase.h", line 48: Warning (Anachronism): Type names qualified by template parameters require "typename".
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/DenseCoeffsBase.h", line 301:     Where: While specializing "Eigen::DenseCoeffsBase<Eigen::Derived, 0>".
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/DenseCoeffsBase.h", line 301:     Where: Specialized in Eigen::DenseCoeffsBase<Eigen::Matrix<int, Eigen::ColPivHouseholderQR<Eigen::MatrixType>::ColsAtCompileTime, 1, 0, Eigen::ColPivHouseholderQR<Eigen::MatrixType>::MaxColsAtCompileTime, 1>, 0>.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/DenseCoeffsBase.h", line 301:     Where: Specialized in Eigen::DenseCoeffsBase<Eigen::Matrix<int, Eigen::ColPivHouseholderQR<Eigen::MatrixType>::ColsAtCompileTime, 1, 0, Eigen::ColPivHouseholderQR<Eigen::MatrixType>::MaxColsAtCompileTime, 1>, 1>.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/DenseCoeffsBase.h", line 553:     Where: Specialized in Eigen::DenseCoeffsBase<Eigen::Matrix<int, Eigen::ColPivHouseholderQR<Eigen::MatrixType>::ColsAtCompileTime, 1, 0, Eigen::ColPivHouseholderQR<Eigen::MatrixType>::MaxColsAtCompileTime, 1>, 3>.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/DenseBase.h", line 47:     Where: Specialized in Eigen::DenseBase<Eigen::Matrix<int, Eigen::ColPivHouseholderQR<Eigen::MatrixType>::ColsAtCompileTime, 1, 0, Eigen::ColPivHouseholderQR<Eigen::MatrixType>::MaxColsAtCompileTime, 1>>.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/MatrixBase.h", line 50:     Where: Specialized in Eigen::MatrixBase<Eigen::Matrix<int, Eigen::ColPivHouseholderQR<Eigen::MatrixType>::ColsAtCompileTime, 1, 0, Eigen::ColPivHouseholderQR<Eigen::MatrixType>::MaxColsAtCompileTime, 1>>.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/PlainObjectBase.h", line 100:     Where: Specialized in Eigen::PlainObjectBase<Eigen::Matrix<int, Eigen::ColPivHouseholderQR<Eigen::MatrixType>::ColsAtCompileTime, 1, 0, Eigen::ColPivHouseholderQR<Eigen::MatrixType>::MaxColsAtCompileTime, 1>>.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/Matrix.h", line 180:     Where: Specialized in Eigen::Matrix<int, Eigen::ColPivHouseholderQR<Eigen::MatrixType>::ColsAtCompileTime, 1, 0, Eigen::ColPivHouseholderQR<Eigen::MatrixType>::MaxColsAtCompileTime, 1>.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/PermutationMatrix.h", line 64:     Where: Specialized in Eigen::PermutationBase<Eigen::PermutationMatrix<Eigen::ColPivHouseholderQR<Eigen::MatrixType>::ColsAtCompileTime, Eigen::ColPivHouseholderQR<Eigen::MatrixType>::MaxColsAtCompileTime, int>>.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/PermutationMatrix.h", line 309:     Where: Specialized in Eigen::PermutationMatrix<Eigen::ColPivHouseholderQR<Eigen::MatrixType>::ColsAtCompileTime, Eigen::ColPivHouseholderQR<Eigen::MatrixType>::MaxColsAtCompileTime, int>.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/QR/ColPivHouseholderQR.h", line 73:     Where: Specialized in Eigen::ColPivHouseholderQR<Eigen::MatrixType>.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/QR/ColPivHouseholderQR.h", line 448:     Where: Specialized in non-template code.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/util/XprHelper.h", line 399: Warning (Anachronism): Type names qualified by template parameters require "typename".
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/CwiseUnaryOp.h", line 61:     Where: While specializing "Eigen::internal::ref_selector<Eigen::internal::T>".
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/CwiseUnaryOp.h", line 61:     Where: Specialized in Eigen::CwiseUnaryOp<Eigen::MatrixBase<Eigen::Matrix<int, Eigen::ColPivHouseholderQR<Eigen::MatrixType>::ColsAtCompileTime, 1, 0, Eigen::ColPivHouseholderQR<Eigen::MatrixType>::MaxColsAtCompileTime, 1>>::CustomUnaryOp, const Eigen::Matrix<int, Eigen::ColPivHouseholderQR<Eigen::MatrixType>::ColsAtCompileTime, 1, 0, Eigen::ColPivHouseholderQR<Eigen::MatrixType>::MaxColsAtCompileTime, 1>>.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/../plugins/CommonCwiseUnaryOps.h", line 122:     Where: Specialized in Eigen::MatrixBase<Eigen::Matrix<int, Eigen::ColPivHouseholderQR<Eigen::MatrixType>::ColsAtCompileTime, 1, 0, Eigen::ColPivHouseholderQR<Eigen::MatrixType>::MaxColsAtCompileTime, 1>>.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/PlainObjectBase.h", line 100:     Where: Specialized in Eigen::PlainObjectBase<Eigen::Matrix<int, Eigen::ColPivHouseholderQR<Eigen::MatrixType>::ColsAtCompileTime, 1, 0, Eigen::ColPivHouseholderQR<Eigen::MatrixType>::MaxColsAtCompileTime, 1>>.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/Matrix.h", line 180:     Where: Specialized in Eigen::Matrix<int, Eigen::ColPivHouseholderQR<Eigen::MatrixType>::ColsAtCompileTime, 1, 0, Eigen::ColPivHouseholderQR<Eigen::MatrixType>::MaxColsAtCompileTime, 1>.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/PermutationMatrix.h", line 64:     Where: Specialized in Eigen::PermutationBase<Eigen::PermutationMatrix<Eigen::ColPivHouseholderQR<Eigen::MatrixType>::ColsAtCompileTime, Eigen::ColPivHouseholderQR<Eigen::MatrixType>::MaxColsAtCompileTime, int>>.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/PermutationMatrix.h", line 309:     Where: Specialized in Eigen::PermutationMatrix<Eigen::ColPivHouseholderQR<Eigen::MatrixType>::ColsAtCompileTime, Eigen::ColPivHouseholderQR<Eigen::MatrixType>::MaxColsAtCompileTime, int>.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/QR/ColPivHouseholderQR.h", line 73:     Where: Specialized in Eigen::ColPivHouseholderQR<Eigen::MatrixType>.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/QR/ColPivHouseholderQR.h", line 448:     Where: Specialized in non-template code.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/util/XprHelper.h", line 405: Warning (Anachronism): Type names qualified by template parameters require "typename".
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/CwiseUnaryOp.h", line 61:     Where: While specializing "Eigen::internal::ref_selector<Eigen::internal::T>".
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/CwiseUnaryOp.h", line 61:     Where: Specialized in Eigen::CwiseUnaryOp<Eigen::MatrixBase<Eigen::Matrix<int, Eigen::ColPivHouseholderQR<Eigen::MatrixType>::ColsAtCompileTime, 1, 0, Eigen::ColPivHouseholderQR<Eigen::MatrixType>::MaxColsAtCompileTime, 1>>::CustomUnaryOp, const Eigen::Matrix<int, Eigen::ColPivHouseholderQR<Eigen::MatrixType>::ColsAtCompileTime, 1, 0, Eigen::ColPivHouseholderQR<Eigen::MatrixType>::MaxColsAtCompileTime, 1>>.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/../plugins/CommonCwiseUnaryOps.h", line 122:     Where: Specialized in Eigen::MatrixBase<Eigen::Matrix<int, Eigen::ColPivHouseholderQR<Eigen::MatrixType>::ColsAtCompileTime, 1, 0, Eigen::ColPivHouseholderQR<Eigen::MatrixType>::MaxColsAtCompileTime, 1>>.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/PlainObjectBase.h", line 100:     Where: Specialized in Eigen::PlainObjectBase<Eigen::Matrix<int, Eigen::ColPivHouseholderQR<Eigen::MatrixType>::ColsAtCompileTime, 1, 0, Eigen::ColPivHouseholderQR<Eigen::MatrixType>::MaxColsAtCompileTime, 1>>.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/Matrix.h", line 180:     Where: Specialized in Eigen::Matrix<int, Eigen::ColPivHouseholderQR<Eigen::MatrixType>::ColsAtCompileTime, 1, 0, Eigen::ColPivHouseholderQR<Eigen::MatrixType>::MaxColsAtCompileTime, 1>.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/PermutationMatrix.h", line 64:     Where: Specialized in Eigen::PermutationBase<Eigen::PermutationMatrix<Eigen::ColPivHouseholderQR<Eigen::MatrixType>::ColsAtCompileTime, Eigen::ColPivHouseholderQR<Eigen::MatrixType>::MaxColsAtCompileTime, int>>.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/PermutationMatrix.h", line 309:     Where: Specialized in Eigen::PermutationMatrix<Eigen::ColPivHouseholderQR<Eigen::MatrixType>::ColsAtCompileTime, Eigen::ColPivHouseholderQR<Eigen::MatrixType>::MaxColsAtCompileTime, int>.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/QR/ColPivHouseholderQR.h", line 73:     Where: Specialized in Eigen::ColPivHouseholderQR<Eigen::MatrixType>.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/QR/ColPivHouseholderQR.h", line 448:     Where: Specialized in non-template code.
"/home/ripley/R/Lib32/BH/include/boost/numeric/odeint/integrate/integrate_const.hpp", line 26: Warning: Last line in file "/home/ripley/R/Lib32/BH/include/boost/numeric/odeint/integrate/check_adapter.hpp" is not terminated with a newline.
"/home/ripley/R/Lib32/Rcpp/include/Rcpp/Interrupt.h", line 60: Warning (Anachronism): Formal argument fun of type extern "C" void(*)(void*) in call to R_ToplevelExec(extern "C" void(*)(void*), void*) is being passed void(*)(void*).
"/home/ripley/R/Lib32/Rcpp/include/Rcpp/String.h", line 95: Warning: enc hides Rcpp::String::enc.
"/home/ripley/R/Lib32/Rcpp/include/Rcpp/String.h", line 107: Warning: enc hides Rcpp::String::enc.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/util/XprHelper.h", line 597: Warning (Anachronism): Type names qualified by template parameters require "typename".
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h", line 103:     Where: While specializing "Eigen::internal::plain_col_type<Eigen::internal::ExpressionType, Eigen::internal::Scalar>".
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h", line 103:     Where: Specialized in Eigen::SelfAdjointEigenSolver<Eigen::Matrix<double, -1, -1, 0, -1, -1>>.
"/home/ripley/R/Lib32/StanHeaders/include/src/stan/optimization/newton.hpp", line 21:     Where: Specialized in non-template code.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/util/XprHelper.h", line 599: Warning (Anachronism): Type names qualified by template parameters require "typename".
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h", line 103:     Where: While specializing "Eigen::internal::plain_col_type<Eigen::internal::ExpressionType, Eigen::internal::Scalar>".
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h", line 103:     Where: Specialized in Eigen::SelfAdjointEigenSolver<Eigen::Matrix<double, -1, -1, 0, -1, -1>>.
"/home/ripley/R/Lib32/StanHeaders/include/src/stan/optimization/newton.hpp", line 21:     Where: Specialized in non-template code.
"/home/ripley/R/Lib32/rstan/include/rstan/value.hpp", line 26: Warning: rstan::value::operator() hides the virtual function stan::callbacks::writer::operator()(const std::vector<std::string>&).
"/home/ripley/R/Lib32/rstan/include/rstan/value.hpp", line 26: Warning: rstan::value::operator() hides the virtual function stan::callbacks::writer::operator()(const std::string &).
"/home/ripley/R/Lib32/rstan/include/rstan/value.hpp", line 26: Warning: rstan::value::operator() hides the virtual function stan::callbacks::writer::operator()().
"/home/ripley/R/Lib32/rstan/include/rstan/values.hpp", line 50: Warning: rstan::values<Rcpp::Vector<14, Rcpp::PreserveStorage<Rcpp::CLASS>>>::operator() hides the virtual function stan::callbacks::writer::operator()(const std::vector<std::string>&).
"/home/ripley/R/Lib32/rstan/include/rstan/filtered_values.hpp", line 17:     Where: While specializing "rstan::values<Rcpp::Vector<14, Rcpp::PreserveStorage<Rcpp::CLASS>>>".
"/home/ripley/R/Lib32/rstan/include/rstan/filtered_values.hpp", line 17:     Where: Specialized in rstan::filtered_values<Rcpp::Vector<14, Rcpp::PreserveStorage<Rcpp::CLASS>>>.
"/home/ripley/R/Lib32/rstan/include/rstan/rstan_writer.hpp", line 17:     Where: Specialized in non-template code.
"/home/ripley/R/Lib32/rstan/include/rstan/values.hpp", line 50: Warning: rstan::values<Rcpp::Vector<14, Rcpp::PreserveStorage<Rcpp::CLASS>>>::operator() hides the virtual function stan::callbacks::writer::operator()(const std::string &).
"/home/ripley/R/Lib32/rstan/include/rstan/filtered_values.hpp", line 17:     Where: While specializing "rstan::values<Rcpp::Vector<14, Rcpp::PreserveStorage<Rcpp::CLASS>>>".
"/home/ripley/R/Lib32/rstan/include/rstan/filtered_values.hpp", line 17:     Where: Specialized in rstan::filtered_values<Rcpp::Vector<14, Rcpp::PreserveStorage<Rcpp::CLASS>>>.
"/home/ripley/R/Lib32/rstan/include/rstan/rstan_writer.hpp", line 17:     Where: Specialized in non-template code.
"/home/ripley/R/Lib32/rstan/include/rstan/values.hpp", line 50: Warning: rstan::values<Rcpp::Vector<14, Rcpp::PreserveStorage<Rcpp::CLASS>>>::operator() hides the virtual function stan::callbacks::writer::operator()().
"/home/ripley/R/Lib32/rstan/include/rstan/filtered_values.hpp", line 17:     Where: While specializing "rstan::values<Rcpp::Vector<14, Rcpp::PreserveStorage<Rcpp::CLASS>>>".
"/home/ripley/R/Lib32/rstan/include/rstan/filtered_values.hpp", line 17:     Where: Specialized in rstan::filtered_values<Rcpp::Vector<14, Rcpp::PreserveStorage<Rcpp::CLASS>>>.
"/home/ripley/R/Lib32/rstan/include/rstan/rstan_writer.hpp", line 17:     Where: Specialized in non-template code.
21 Error(s) and 16 Warning(s) detected.
make: Fatal error: Command failed for target `file6ad5727e28e1.o'
Current working directory /tmp/Rtmp3yaOA1

ERROR(s) during compilation: source code errors or compiler configuration errors!

Program source:
  1: 
  2: // includes from the plugin
  3: 
  4: 
  5: // user includes
  6: #define STAN__SERVICES__COMMAND_HPP// Code generated by Stan version 2.16.0
  7: 
  8: #include <stan/model/model_header.hpp>
  9: 
 10: namespace model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85_namespace {
 11: 
 12: using std::istream;
 13: using std::string;
 14: using std::stringstream;
 15: using std::vector;
 16: using stan::io::dump;
 17: using stan::math::lgamma;
 18: using stan::model::prob_grad;
 19: using namespace stan::math;
 20: 
 21: typedef Eigen::Matrix<double,Eigen::Dynamic,1> vector_d;
 22: typedef Eigen::Matrix<double,1,Eigen::Dynamic> row_vector_d;
 23: typedef Eigen::Matrix<double,Eigen::Dynamic,Eigen::Dynamic> matrix_d;
 24: 
 25: static int current_statement_begin__;
 26: 
 27: stan::io::program_reader prog_reader__() {
 28:     stan::io::program_reader reader;
 29:     reader.add_event(0, 0, "start", "model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85");
 30:     reader.add_event(17, 17, "end", "model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85");
 31:     return reader;
 32: }
 33: 
 34: class model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85 : public prob_grad {
 35: private:
 36:     int J;
 37:     vector_d y;
 38:     vector_d sigma;
 39: public:
 40:     model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85(stan::io::var_context& context__,
 41:         std::ostream* pstream__ = 0)
 42:         : prob_grad(0) {
 43:         ctor_body(context__, 0, pstream__);
 44:     }
 45: 
 46:     model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85(stan::io::var_context& context__,
 47:         unsigned int random_seed__,
 48:         std::ostream* pstream__ = 0)
 49:         : prob_grad(0) {
 50:         ctor_body(context__, random_seed__, pstream__);
 51:     }
 52: 
 53:     void ctor_body(stan::io::var_context& context__,
 54:                    unsigned int random_seed__,
 55:                    std::ostream* pstream__) {
 56:         boost::ecuyer1988 base_rng__ =
 57:           stan::services::util::create_rng(random_seed__, 0);
 58:         (void) base_rng__;  // suppress unused var warning
 59: 
 60:         current_statement_begin__ = -1;
 61: 
 62:         static const char* function__ = "model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85_namespace::model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85";
 63:         (void) function__;  // dummy to suppress unused var warning
 64:         size_t pos__;
 65:         (void) pos__;  // dummy to suppress unused var warning
 66:         std::vector<int> vals_i__;
 67:         std::vector<double> vals_r__;
 68:         double DUMMY_VAR__(std::numeric_limits<double>::quiet_NaN());
 69:         (void) DUMMY_VAR__;  // suppress unused var warning
 70: 
 71:         // initialize member variables
 72:         context__.validate_dims("data initialization", "J", "int", context__.to_vec());
 73:         J = int(0);
 74:         vals_i__ = context__.vals_i("J");
 75:         pos__ = 0;
 76:         J = vals_i__[pos__++];
 77:         validate_non_negative_index("y", "J", J);
 78:         context__.validate_dims("data initialization", "y", "vector_d", context__.to_vec(J));
 79:         validate_non_negative_index("y", "J", J);
 80:         y = vector_d(static_cast<Eigen::VectorXd::Index>(J));
 81:         vals_r__ = context__.vals_r("y");
 82:         pos__ = 0;
 83:         size_t y_i_vec_lim__ = J;
 84:         for (size_t i_vec__ = 0; i_vec__ < y_i_vec_lim__; ++i_vec__) {
 85:             y[i_vec__] = vals_r__[pos__++];
 86:         }
 87:         validate_non_negative_index("sigma", "J", J);
 88:         context__.validate_dims("data initialization", "sigma", "vector_d", context__.to_vec(J));
 89:         validate_non_negative_index("sigma", "J", J);
 90:         sigma = vector_d(static_cast<Eigen::VectorXd::Index>(J));
 91:         vals_r__ = context__.vals_r("sigma");
 92:         pos__ = 0;
 93:         size_t sigma_i_vec_lim__ = J;
 94:         for (size_t i_vec__ = 0; i_vec__ < sigma_i_vec_lim__; ++i_vec__) {
 95:             sigma[i_vec__] = vals_r__[pos__++];
 96:         }
 97: 
 98:         // validate, data variables
 99:         check_greater_or_equal(function__,"J",J,0);
100:         check_greater_or_equal(function__,"sigma",sigma,0);
101:         // initialize data variables
102: 
103:         try {
104:         } catch (const std::exception& e) {
105:             stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__());
106:             // Next line prevents compiler griping about no return
107:             throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***");
108:         }
109: 
110:         // validate transformed data
111: 
112:         // validate, set parameter ranges
113:         num_params_r__ = 0U;
114:         param_ranges_i__.clear();
115:         ++num_params_r__;
116:         ++num_params_r__;
117:         validate_non_negative_index("theta", "J", J);
118:         num_params_r__ += J;
119:     }
120: 
121:     ~model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85() { }
122: 
123: 
124:     void transform_inits(const stan::io::var_context& context__,
125:                          std::vector<int>& params_i__,
126:                          std::vector<double>& params_r__,
127:                          std::ostream* pstream__) const {
128:         stan::io::writer<double> writer__(params_r__,params_i__);
129:         size_t pos__;
130:         (void) pos__; // dummy call to supress warning
131:         std::vector<double> vals_r__;
132:         std::vector<int> vals_i__;
133: 
134:         if (!(context__.contains_r("mu")))
135:             throw std::runtime_error("variable mu missing");
136:         vals_r__ = context__.vals_r("mu");
137:         pos__ = 0U;
138:         context__.validate_dims("initialization", "mu", "double", context__.to_vec());
139:         // generate_declaration mu
140:         double mu(0);
141:         mu = vals_r__[pos__++];
142:         try {
143:             writer__.scalar_unconstrain(mu);
144:         } catch (const std::exception& e) { 
145:             throw std::runtime_error(std::string("Error transforming variable mu: ") + e.what());
146:         }
147: 
148:         if (!(context__.contains_r("tau")))
149:             throw std::runtime_error("variable tau missing");
150:         vals_r__ = context__.vals_r("tau");
151:         pos__ = 0U;
152:         context__.validate_dims("initialization", "tau", "double", context__.to_vec());
153:         // generate_declaration tau
154:         double tau(0);
155:         tau = vals_r__[pos__++];
156:         try {
157:             writer__.scalar_lb_unconstrain(0,tau);
158:         } catch (const std::exception& e) { 
159:             throw std::runtime_error(std::string("Error transforming variable tau: ") + e.what());
160:         }
161: 
162:         if (!(context__.contains_r("theta")))
163:             throw std::runtime_error("variable theta missing");
164:         vals_r__ = context__.vals_r("theta");
165:         pos__ = 0U;
166:         validate_non_negative_index("theta", "J", J);
167:         context__.validate_dims("initialization", "theta", "vector_d", context__.to_vec(J));
168:         // generate_declaration theta
169:         vector_d theta(static_cast<Eigen::VectorXd::Index>(J));
170:         for (int j1__ = 0U; j1__ < J; ++j1__)
171:             theta(j1__) = vals_r__[pos__++];
172:         try {
173:             writer__.vector_unconstrain(theta);
174:         } catch (const std::exception& e) { 
175:             throw std::runtime_error(std::string("Error transforming variable theta: ") + e.what());
176:         }
177: 
178:         params_r__ = writer__.data_r();
179:         params_i__ = writer__.data_i();
180:     }
181: 
182:     void transform_inits(const stan::io::var_context& context,
183:                          Eigen::Matrix<double,Eigen::Dynamic,1>& params_r,
184:                          std::ostream* pstream__) const {
185:       std::vector<double> params_r_vec;
186:       std::vector<int> params_i_vec;
187:       transform_inits(context, params_i_vec, params_r_vec, pstream__);
188:       params_r.resize(params_r_vec.size());
189:       for (int i = 0; i < params_r.size(); ++i)
190:         params_r(i) = params_r_vec[i];
191:     }
192: 
193: 
194:     template <bool propto__, bool jacobian__, typename T__>
195:     T__ log_prob(vector<T__>& params_r__,
196:                  vector<int>& params_i__,
197:                  std::ostream* pstream__ = 0) const {
198: 
199:         T__ DUMMY_VAR__(std::numeric_limits<double>::quiet_NaN());
200:         (void) DUMMY_VAR__;  // suppress unused var warning
201: 
202:         T__ lp__(0.0);
203:         stan::math::accumulator<T__> lp_accum__;
204: 
205:         // model parameters
206:         stan::io::reader<T__> in__(params_r__,params_i__);
207: 
208:         T__ mu;
209:         (void) mu;  // dummy to suppress unused var warning
210:         if (jacobian__)
211:             mu = in__.scalar_constrain(lp__);
212:         else
213:             mu = in__.scalar_constrain();
214: 
215:         T__ tau;
216:         (void) tau;  // dummy to suppress unused var warning
217:         if (jacobian__)
218:             tau = in__.scalar_lb_constrain(0,lp__);
219:         else
220:             tau = in__.scalar_lb_constrain(0);
221: 
222:         Eigen::Matrix<T__,Eigen::Dynamic,1>  theta;
223:         (void) theta;  // dummy to suppress unused var warning
224:         if (jacobian__)
225:             theta = in__.vector_constrain(J,lp__);
226:         else
227:             theta = in__.vector_constrain(J);
228: 
229: 
230:         // transformed parameters
231: 
232: 
233:         try {
234:         } catch (const std::exception& e) {
235:             stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__());
236:             // Next line prevents compiler griping about no return
237:             throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***");
238:         }
239: 
240:         // validate transformed parameters
241: 
242:         const char* function__ = "validate transformed params";
243:         (void) function__;  // dummy to suppress unused var warning
244: 
245:         // model body
246:         try {
247: 
248:             current_statement_begin__ = 13;
249:             lp_accum__.add(normal_log<propto__>(mu, 0, 10));
250:             current_statement_begin__ = 14;
251:             lp_accum__.add(cauchy_log<propto__>(tau, 0, 10));
252:             current_statement_begin__ = 15;
253:             lp_accum__.add(normal_log<propto__>(theta, mu, tau));
254:             current_statement_begin__ = 16;
255:             lp_accum__.add(normal_log<propto__>(y, theta, sigma));
256:         } catch (const std::exception& e) {
257:             stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__());
258:             // Next line prevents compiler griping about no return
259:             throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***");
260:         }
261: 
262:         lp_accum__.add(lp__);
263:         return lp_accum__.sum();
264: 
265:     } // log_prob()
266: 
267:     template <bool propto, bool jacobian, typename T_>
268:     T_ log_prob(Eigen::Matrix<T_,Eigen::Dynamic,1>& params_r,
269:                std::ostream* pstream = 0) const {
270:       std::vector<T_> vec_params_r;
271:       vec_params_r.reserve(params_r.size());
272:       for (int i = 0; i < params_r.size(); ++i)
273:         vec_params_r.push_back(params_r(i));
274:       std::vector<int> vec_params_i;
275:       return log_prob<propto,jacobian,T_>(vec_params_r, vec_params_i, pstream);
276:     }
277: 
278: 
279:     void get_param_names(std::vector<std::string>& names__) const {
280:         names__.resize(0);
281:         names__.push_back("mu");
282:         names__.push_back("tau");
283:         names__.push_back("theta");
284:     }
285: 
286: 
287:     void get_dims(std::vector<std::vector<size_t> >& dimss__) const {
288:         dimss__.resize(0);
289:         std::vector<size_t> dims__;
290:         dims__.resize(0);
291:         dimss__.push_back(dims__);
292:         dims__.resize(0);
293:         dimss__.push_back(dims__);
294:         dims__.resize(0);
295:         dims__.push_back(J);
296:         dimss__.push_back(dims__);
297:     }
298: 
299:     template <typename RNG>
300:     void write_array(RNG& base_rng__,
301:                      std::vector<double>& params_r__,
302:                      std::vector<int>& params_i__,
303:                      std::vector<double>& vars__,
304:                      bool include_tparams__ = true,
305:                      bool include_gqs__ = true,
306:                      std::ostream* pstream__ = 0) const {
307:         vars__.resize(0);
308:         stan::io::reader<double> in__(params_r__,params_i__);
309:         static const char* function__ = "model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85_namespace::write_array";
310:         (void) function__;  // dummy to suppress unused var warning
311:         // read-transform, write parameters
312:         double mu = in__.scalar_constrain();
313:         double tau = in__.scalar_lb_constrain(0);
314:         vector_d theta = in__.vector_constrain(J);
315:         vars__.push_back(mu);
316:         vars__.push_back(tau);
317:         for (int k_0__ = 0; k_0__ < J; ++k_0__) {
318:             vars__.push_back(theta[k_0__]);
319:         }
320: 
321:         if (!include_tparams__) return;
322:         // declare and define transformed parameters
323:         double lp__ = 0.0;
324:         (void) lp__;  // dummy to suppress unused var warning
325:         stan::math::accumulator<double> lp_accum__;
326: 
327:         double DUMMY_VAR__(std::numeric_limits<double>::quiet_NaN());
328:         (void) DUMMY_VAR__;  // suppress unused var warning
329: 
330: 
331: 
332:         try {
333:         } catch (const std::exception& e) {
334:             stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__());
335:             // Next line prevents compiler griping about no return
336:             throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***");
337:         }
338: 
339:         // validate transformed parameters
340: 
341:         // write transformed parameters
342: 
343:         if (!include_gqs__) return;
344:         // declare and define generated quantities
345: 
346: 
347:         try {
348:         } catch (const std::exception& e) {
349:             stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__());
350:             // Next line prevents compiler griping about no return
351:             throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***");
352:         }
353: 
354:         // validate generated quantities
355: 
356:         // write generated quantities
357:     }
358: 
359:     template <typename RNG>
360:     void write_array(RNG& base_rng,
361:                      Eigen::Matrix<double,Eigen::Dynamic,1>& params_r,
362:                      Eigen::Matrix<double,Eigen::Dynamic,1>& vars,
363:                      bool include_tparams = true,
364:                      bool include_gqs = true,
365:                      std::ostream* pstream = 0) const {
366:       std::vector<double> params_r_vec(params_r.size());
367:       for (int i = 0; i < params_r.size(); ++i)
368:         params_r_vec[i] = params_r(i);
369:       std::vector<double> vars_vec;
370:       std::vector<int> params_i_vec;
371:       write_array(base_rng,params_r_vec,params_i_vec,vars_vec,include_tparams,include_gqs,pstream);
372:       vars.resize(vars_vec.size());
373:       for (int i = 0; i < vars.size(); ++i)
374:         vars(i) = vars_vec[i];
375:     }
376: 
377:     static std::string model_name() {
378:         return "model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85";
379:     }
380: 
381: 
382:     void constrained_param_names(std::vector<std::string>& param_names__,
383:                                  bool include_tparams__ = true,
384:                                  bool include_gqs__ = true) const {
385:         std::stringstream param_name_stream__;
386:         param_name_stream__.str(std::string());
387:         param_name_stream__ << "mu";
388:         param_names__.push_back(param_name_stream__.str());
389:         param_name_stream__.str(std::string());
390:         param_name_stream__ << "tau";
391:         param_names__.push_back(param_name_stream__.str());
392:         for (int k_0__ = 1; k_0__ <= J; ++k_0__) {
393:             param_name_stream__.str(std::string());
394:             param_name_stream__ << "theta" << '.' << k_0__;
395:             param_names__.push_back(param_name_stream__.str());
396:         }
397: 
398:         if (!include_gqs__ && !include_tparams__) return;
399: 
400:         if (!include_gqs__) return;
401:     }
402: 
403: 
404:     void unconstrained_param_names(std::vector<std::string>& param_names__,
405:                                    bool include_tparams__ = true,
406:                                    bool include_gqs__ = true) const {
407:         std::stringstream param_name_stream__;
408:         param_name_stream__.str(std::string());
409:         param_name_stream__ << "mu";
410:         param_names__.push_back(param_name_stream__.str());
411:         param_name_stream__.str(std::string());
412:         param_name_stream__ << "tau";
413:         param_names__.push_back(param_name_stream__.str());
414:         for (int k_0__ = 1; k_0__ <= J; ++k_0__) {
415:             param_name_stream__.str(std::string());
416:             param_name_stream__ << "theta" << '.' << k_0__;
417:             param_names__.push_back(param_name_stream__.str());
418:         }
419: 
420:         if (!include_gqs__ && !include_tparams__) return;
421: 
422:         if (!include_gqs__) return;
423:     }
424: 
425: }; // model
426: 
427: }
428: 
429: typedef model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85_namespace::model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85 stan_model;
430: 
431: #include <rstan/rstaninc.hpp>
432: /**
433:  * Define Rcpp Module to expose stan_fit's functions to R.
434:  */
435: RCPP_MODULE(stan_fit4model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85_mod){
436:   Rcpp::class_<rstan::stan_fit<model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85_namespace::model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85,
437:                boost::random::ecuyer1988> >("stan_fit4model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85")
438:     // .constructor<Rcpp::List>()
439:     .constructor<SEXP, SEXP, SEXP>()
440:     // .constructor<SEXP, SEXP>()
441:     .method("call_sampler",
442:             &rstan::stan_fit<model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85_namespace::model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85, boost::random::ecuyer1988>::call_sampler)
443:     .method("param_names",
444:             &rstan::stan_fit<model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85_namespace::model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85, boost::random::ecuyer1988>::param_names)
445:     .method("param_names_oi",
446:             &rstan::stan_fit<model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85_namespace::model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85, boost::random::ecuyer1988>::param_names_oi)
447:     .method("param_fnames_oi",
448:             &rstan::stan_fit<model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85_namespace::model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85, boost::random::ecuyer1988>::param_fnames_oi)
449:     .method("param_dims",
450:             &rstan::stan_fit<model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85_namespace::model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85, boost::random::ecuyer1988>::param_dims)
451:     .method("param_dims_oi",
452:             &rstan::stan_fit<model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85_namespace::model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85, boost::random::ecuyer1988>::param_dims_oi)
453:     .method("update_param_oi",
454:             &rstan::stan_fit<model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85_namespace::model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85, boost::random::ecuyer1988>::update_param_oi)
455:     .method("param_oi_tidx",
456:             &rstan::stan_fit<model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85_namespace::model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85, boost::random::ecuyer1988>::param_oi_tidx)
457:     .method("grad_log_prob",
458:             &rstan::stan_fit<model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85_namespace::model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85, boost::random::ecuyer1988>::grad_log_prob)
459:     .method("log_prob",
460:             &rstan::stan_fit<model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85_namespace::model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85, boost::random::ecuyer1988>::log_prob)
461:     .method("unconstrain_pars",
462:             &rstan::stan_fit<model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85_namespace::model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85, boost::random::ecuyer1988>::unconstrain_pars)
463:     .method("constrain_pars",
464:             &rstan::stan_fit<model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85_namespace::model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85, boost::random::ecuyer1988>::constrain_pars)
465:     .method("num_pars_unconstrained",
466:             &rstan::stan_fit<model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85_namespace::model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85, boost::random::ecuyer1988>::num_pars_unconstrained)
467:     .method("unconstrained_param_names",
468:             &rstan::stan_fit<model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85_namespace::model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85, boost::random::ecuyer1988>::unconstrained_param_names)
469:     .method("constrained_param_names",
470:             &rstan::stan_fit<model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85_namespace::model6ad52d244569_900a545aeaa595fc46a251e5ba88bc85, boost::random::ecuyer1988>::constrained_param_names)
471:     ;
472: }
473: 
474: // declarations
475: extern "C" {
476: SEXP file6ad5727e28e1( ) ;
477: }
478: 
479: // definition
480: 
481: SEXP file6ad5727e28e1(  ){
482:  return Rcpp::wrap("900a545aeaa595fc46a251e5ba88bc85");
483: }
484: 
485: 
Quitting from lines 74-91 (visual-mcmc-diagnostics.Rmd) 
Error: processing vignette 'visual-mcmc-diagnostics.Rmd' failed with diagnostics:
Compilation ERROR, function(s)/method(s) not created! "/home/ripley/R/Lib32/StanHeaders/include/stan/math/memory/stack_alloc.hpp", line 39: Error: The function "malloc" must have a prototype.
"/home/ripley/R/Lib32/StanHeaders/include/stan/math/memory/stack_alloc.hpp", line 39: Error: Using static_cast to convert from int to char* not allowed.
"/home/ripley/R/Lib32/StanHeaders/include/stan/math/memory/stack_alloc.hpp", line 147: Error: The function "free" must have a prototype.
"/home/ripley/R/Lib32/StanHeaders/include/stan/math/memory/stack_alloc.hpp", line 234: Error: The function "free" must have a prototype.
"/home/ripley/R/Lib32/BH/include/boost/config/compiler/sunpro_cc.hpp", line 117: Warning (Anachronism): Attempt to redefine BOOST_NO_CXX11_RVALUE_REFERENCES without using #undef.
"/home/ripley/R/Lib32/RcppEigen/include/Eigen/src/Core/arch/CUDA/Half.h", line 391: Error: expf is not a member of file
Execution halted