We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eeb7b71 commit e68bd05Copy full SHA for e68bd05
tools/make_cc.R
@@ -24,12 +24,11 @@ make_cc <- function(file) {
24
cppcode <- sub("(class[[:space:]][A-Za-z_][A-Za-z0-9_]*[[:space:]])",
25
paste("#include <meta_header.hpp>\n", "\\1"), cppcode)
26
27
- cat(readLines(dir("stan_files", pattern = "license.stan", recursive = TRUE, full.names = TRUE)),
+ writeLines(c(readLines(dir("stan_files", pattern = "license.stan", recursive = TRUE, full.names = TRUE)),
28
"#ifndef MODELS_HPP", "#define MODELS_HPP", "#define STAN__SERVICES__COMMAND_HPP",
29
"#include <rstan/rstaninc.hpp>",
30
- cppcode, "#endif", file = sub("\\.stan$", ".hpp", file),
31
- sep = "\n", append = FALSE)
32
-
+ cppcode, "#endif"), con = sub("\\.stan$", ".hpp", file))
+
33
f <- sub("\\.stan$", "", basename(file))
34
Rcpp::exposeClass(class = paste0("model_", f),
35
constructors = list(c("SEXP", "SEXP", "SEXP")), fields = character(),
0 commit comments