@@ -81,18 +81,27 @@ Rcpp.package.skeleton <- function(name = "anRpackage", list = character(),
8181 DESCRIPTION <- file.path(root , " DESCRIPTION" )
8282 if (file.exists(DESCRIPTION )) {
8383 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" )),
8587 " 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)
8995 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) ."
9298 message( " >> added Imports: Rcpp" )
9399 message( " >> added LinkingTo: Rcpp" )
94100 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 )
96105 }
97106
98107 # # add useDynLib and importFrom to NAMESPACE
0 commit comments