@@ -81,18 +81,27 @@ Rcpp.package.skeleton <- function(name = "anRpackage", list = character(),
81
81
DESCRIPTION <- file.path(root , " DESCRIPTION" )
82
82
if (file.exists(DESCRIPTION )) {
83
83
imports <- c(if (isTRUE(module )) " methods" , sprintf(" Rcpp (>= %s)" , getRcppVersion()))
84
- x <- cbind(read.dcf(DESCRIPTION ),
84
+ splitname <- strsplit(author , " " )[[1 ]]
85
+ x <- cbind(read.dcf(DESCRIPTION , fields = c(" Package" , " Type" , " Title" , " Version" , " Date" ,
86
+ " Description" , " License" )),
85
87
" Imports" = paste(imports , collapse = " , " ),
86
- " LinkingTo" = " Rcpp" )
87
- x [, " Author" ] <- author
88
- x [, " Maintainer" ] <- sprintf(" %s <%s>" , maintainer , email )
88
+ " LinkingTo" = " Rcpp" ,
89
+ " Authors@R" = sprintf(" person(\" %s\" , \" %s\" , role = c(\" aut\" , \" cre\" ), email = \" %s\" )" ,
90
+ paste(splitname [- length(splitname )], collapse = " " ),
91
+ splitname [length(splitname )],
92
+ email ))
93
+ # x[, "Author"] <- author
94
+ # x[, "Maintainer"] <- sprintf("%s <%s>", maintainer, email)
89
95
x [, " License" ] <- license
90
- x [, " Title" ] <- " What the Package Does in One 'Title Case' Line "
91
- x [, " Description" ] <- " One paragraph description of what the package does as one or more full sentences ."
96
+ x [, " Title" ] <- " Concise Summary of What the Package Does"
97
+ x [, " Description" ] <- " More about what it does (maybe more than one line) ."
92
98
message( " >> added Imports: Rcpp" )
93
99
message( " >> added LinkingTo: Rcpp" )
94
100
write.dcf(x , file = DESCRIPTION )
95
-
101
+ write.dcf(x [1 , c(" Package" , " Type" , " Title" , " Version" , " Date" ,
102
+ " Authors@R" , " Description" , " License" , " Imports" , " LinkingTo" ),
103
+ drop = FALSE ],
104
+ file = DESCRIPTION )
96
105
}
97
106
98
107
# # add useDynLib and importFrom to NAMESPACE
0 commit comments