File: Rcpp-attributes.R

package info (click to toggle)
rcpp 1.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 12,344 kB
  • sloc: ansic: 43,817; cpp: 39,947; sh: 51; makefile: 2
file content (42 lines) | stat: -rw-r--r-- 1,438 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
## ---- eval = FALSE-------------------------------------------------------
#  sourceCpp("convolve.cpp")
#  convolveCpp(x, y)

## ---- eval = FALSE-------------------------------------------------------
#  function(file, colNames=character(),
#           comment="#", header=TRUE)

## ---- eval = FALSE-------------------------------------------------------
#  cppFunction('
#    int fibonacci(const int x) {
#      if (x < 2)
#        return x;
#      else
#        return (fibonacci(x-1)) + fibonacci(x-2);
#    }
#  ')
#  
#  evalCpp('std::numeric_limits<double>::max()')

## ---- eval = FALSE-------------------------------------------------------
#  cppFunction(depends='RcppArmadillo', code='...')

## ---- eval = FALSE-------------------------------------------------------
#  Rcpp.package.skeleton("NewPackage",
#                        attributes = TRUE)

## ---- eval = FALSE-------------------------------------------------------
#  Rcpp.package.skeleton("NewPackage",
#                        example_code = FALSE,
#                        cpp_files = c("convolve.cpp"))

## ---- eval = FALSE-------------------------------------------------------
#  compileAttributes()

## ---- eval = FALSE-------------------------------------------------------
#  #' The length of a string (in characters).
#  #'
#  #' @param str input character vector
#  #' @return characters in each element of the vector
#  strLength <- function(str)