You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
\code{TRUE} to print detailed information about generated code to the console.
42
+
}
43
+
\item{echo}{
44
+
\code{TRUE} to silence output from optional R evaluation if set to \code{FALSE}.
42
45
}
43
46
}
44
47
\details{
45
48
Functions defined using \code{cppFunction} must have return types that are compatible with \code{Rcpp::wrap} and parameter types that are compatible with \code{Rcpp::as}.
46
-
49
+
47
50
The shared library will not be rebuilt if the underlying code has not changed since the last compilation.
It's possible to embed chunks of R code within a C++ source file by
74
+
including the R code within a block comment with the
72
75
prefix of \code{/*** R}. For example:
73
-
76
+
74
77
\preformatted{
75
78
/*** R
76
79
@@ -80,11 +83,11 @@ fibonacci(10)
80
83
*/
81
84
}
82
85
83
-
Multiple R code chunks can be included in a C++ file. R code is sourced after the C++ compilation is completed so all functions and modules will be available to the R code.
86
+
Multiple R code chunks can be included in a C++ file. R code is sourced after the C++ compilation is completed so all functions and modules will be available to the R code.
84
87
}
85
88
86
89
\value{
87
-
Returns (invisibly) a list with two elements:
90
+
Returns (invisibly) a list with two elements:
88
91
\tabular{ll}{
89
92
\code{functions} \tab Names of exported functions\cr
90
93
\code{modules} \tab Names of Rcpp modules\cr
@@ -95,9 +98,9 @@ fibonacci(10)
95
98
The \code{sourceCpp} function will not rebuild the shared library if the source file has not changed since the last compilation.
96
99
97
100
The \code{sourceCpp} function is designed for compiling a standalone source file whose only dependencies are R packages. If you are compiling more than one source file or have external dependencies then you should create an R package rather than using \code{sourceCpp}. Note that the \code{\link[=exportAttribute]{Rcpp::export}} attribute can also be used within packages via the \code{\link{compileAttributes}} function.
98
-
101
+
99
102
If you are sourcing a C++ file from within the \code{src} directory of a package then the package's \code{LinkingTo} dependencies, \code{inst/include}, and \code{src} directoriesareautomaticallyincludedinthecompilation.
0 commit comments