4
4
Create a skeleton for a new package depending on Rcpp
5
5
}
6
6
\description {
7
- \code {Rcpp.package.skeleton } automates the creation of
8
- a new source package that intends to use features of Rcpp.
9
-
7
+ \code {Rcpp.package.skeleton } automates the creation of
8
+ a new source package that intends to use features of Rcpp.
9
+
10
10
It is based on the \link [utils ]{package.skeleton } function
11
11
which it executes first.
12
12
}
13
13
\usage {
14
- Rcpp.package.skeleton(name = " anRpackage" , list = character (),
15
- environment = .GlobalEnv , path = " ." , force = FALSE ,
14
+ Rcpp.package.skeleton(name = " anRpackage" , list = character (),
15
+ environment = .GlobalEnv , path = " ." , force = FALSE ,
16
16
code_files = character (), cpp_files = character (),
17
- example_code = TRUE , attributes = TRUE , module = FALSE ,
18
- author = " Your Name" ,
19
- maintainer = if (missing( author )) " Your Name" else author ,
20
- email = " your@email.com" ,
17
+ example_code = TRUE , attributes = TRUE , module = FALSE ,
18
+ author = " Your Name" ,
19
+ maintainer = if (missing( author )) " Your Name" else author ,
20
+ email = " your@email.com" , githubuser = NA_character_ ,
21
21
license = " GPL (>= 2)"
22
22
)
23
23
}
@@ -35,42 +35,43 @@ Rcpp.package.skeleton(name = "anRpackage", list = character(),
35
35
\item {author }{Author of the package. }
36
36
\item {maintainer }{Maintainer of the package. }
37
37
\item {email }{Email of the package maintainer. }
38
+ \item {githubuser }{GitHub username for URL and BugReports , if present. }
38
39
\item {license }{License of the package. }
39
40
}
40
41
\details {
41
- In addition to \link [utils ]{package.skeleton } :
42
-
43
- The \samp {DESCRIPTION } file gains an Imports line requesting that
42
+ In addition to \link [utils ]{package.skeleton } :
43
+
44
+ The \samp {DESCRIPTION } file gains an Imports line requesting that
44
45
the package depends on Rcpp and a LinkingTo line so that the package
45
46
finds Rcpp header files.
46
-
47
+
47
48
The \samp {NAMESPACE } gains a \code {useDynLib } directive as well
48
49
as an \code {importFrom(Rcpp , evalCpp } to ensure instantiation of Rcpp.
49
-
50
- The \samp {src } directory is created if it does not exists.
51
-
50
+
51
+ The \samp {src } directory is created if it does not exists.
52
+
52
53
If \code {cpp_files } are provided then they will be copied to the \samp {src }
53
54
directory.
54
-
55
- If the \code {example_code } argument is set to \code {TRUE },
55
+
56
+ If the \code {example_code } argument is set to \code {TRUE },
56
57
example files \samp {rcpp_hello_world.h } and \samp {rcpp_hello_world.cpp }
57
- are also created in the \samp {src }. An R file \samp {rcpp_hello_world.R } is
58
+ are also created in the \samp {src }. An R file \samp {rcpp_hello_world.R } is
58
59
expanded in the \samp {R } directory , the \code {rcpp_hello_world } function
59
60
defined in this files makes use of the C ++ function \samp {rcpp_hello_world }
60
- defined in the C ++ file. These files are given as an example and should
61
+ defined in the C ++ file. These files are given as an example and should
61
62
eventually by removed from the generated package.
62
-
63
+
63
64
If the \code {attributes } argument is \code {TRUE }, then rather than generate
64
65
the example files as described above , a single \samp {rcpp_hello_world.cpp }
65
- file is created in the \samp {src } directory and it ' s attributes are
66
- compiled using the \c ode{\l ink{compileAttributes}} function. This leads to
66
+ file is created in the \samp {src } directory and it ' s attributes are
67
+ compiled using the \c ode{\l ink{compileAttributes}} function. This leads to
67
68
the files \s amp{RcppExports.R} and \s amp{RcppExports.cpp} being generated.
68
- They are automatically regenerated from \e mph{scratch} each time
69
- \c ode{\l ink{compileAttributes}} is called. Therefore, one should
69
+ They are automatically regenerated from \e mph{scratch} each time
70
+ \c ode{\l ink{compileAttributes}} is called. Therefore, one should
70
71
\s trong{not} modify by hand either of the \s amp{RcppExports} files.
71
-
72
- If the \c ode{module} argument is \c ode{TRUE}, a sample Rcpp module will
73
- be generated as well.
72
+
73
+ If the \c ode{module} argument is \c ode{TRUE}, a sample Rcpp module will
74
+ be generated as well.
74
75
}
75
76
\v alue{
76
77
Nothing, used for its side effects
@@ -105,4 +106,3 @@ vignette( "Rcpp-modules" )
105
106
}
106
107
}
107
108
\k eyword{ programming }
108
-
0 commit comments