-
Notifications
You must be signed in to change notification settings - Fork 0
/
do-roxy
executable file
·31 lines (31 loc) · 1.07 KB
/
do-roxy
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
#! /usr/bin/env Rscript
#
pkg <- "lme4"
pDIR <- switch((U <- Sys.getenv("USER")),
"maechler" = "~/R/Pkgs",
"bates" = "~/gitR",
"bolker" = "~/R/pkgs/lme4git",
"stevenwalker" = "~/Development/lme4git",
## default:
{ p <- "/tmp"
warning("unknown USER ", U,". -- using pDIR=",p,
"\n but probably need to add yourself to 'do-roxy' script")
p
})
pkgPATH <- file.path(pDIR, pkg)
#
library(roxygen2)
if(TRUE) { # come on; the auto-produced *.Rd is awful, and then produces CRAN check notes
# about lines too wide ..
roxygenize(pkgPATH, roclets = c("collate", "namespace"))## *NOT* using "rd"
} else {
roxygenize(pkgPATH)## <-- also recreates *.Rd files
}
owd <- setwd(pkgPATH)
## FIX NAMESPACE entry : useDynLib(lme4,".registration=TRUE")
ll <- readLines("NAMESPACE")
i <- grep("useDynLib", ll)
ll[i] <- gsub('"', '', ll[i])#"
## hack explicit export of a method ...
ll <- c(ll,"export(fortify.lmerMod)")
writeLines(ll, "NAMESPACE")