Skip to content

Commit 474fe21

Browse files
committed
fix errors
fix errors brought up by R-CMD check
1 parent df0785a commit 474fe21

5 files changed

Lines changed: 16 additions & 6 deletions

File tree

glmmTMB/DESCRIPTION

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ License: AGPL-3
5555
Depends: R (>= 3.6.0)
5656
Imports:
5757
methods,
58+
RTMB,
5859
TMB (>= 1.9.0),
5960
lme4 (>= 1.1-18.9000),
6061
Matrix,
@@ -109,4 +110,4 @@ LazyData: TRUE
109110
BugReports: https://github.com/glmmTMB/glmmTMB/issues
110111
NeedsCompilation: yes
111112
Encoding: UTF-8
112-
RoxygenNote: 7.3.3
113+
Config/roxygen2/version: 8.0.0

glmmTMB/R/family.R

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,17 @@ family_factory <- function(default_link, family, variance) {
1212
}
1313

1414
## suppress code warnings for nbinom1/nbinom2; can't use .Theta <- NULL trick here ...
15-
utils::globalVariables(".Theta")
16-
utils::globalVariables(".Phi")
15+
# utils::globalVariables(".Theta")
16+
# utils::globalVariables(".Phi")
17+
18+
## also suppresses warnings for variables injected into scope by RTMB::getAll()
19+
## in rtmb_tpl() (see R/rtmb_tpl.R)
20+
utils::globalVariables(c(
21+
".Theta", ".Phi",
22+
"b", "theta", "XS", "Z", "offset", "link",
23+
"betazi", "XziS", "offsetzi",
24+
"XdistS", "betadisp", "offsetdisp"
25+
))
1726

1827
## see whether calling function has been called from glm.fit ...
1928
in_glm_fit <- function() {

glmmTMB/R/rtmb_tpl.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ termwise_nll <- function(U, theta, term) {
8787
n <- term$blockSize
8888
reps <- term$blockReps
8989
logsd <- head(theta, n)
90-
corr_transf <- tail(theta, -n)
90+
corr_transf <- theta[-(seq_len(n))]
9191
sd <- exp(logsd)
9292
us <- RTMB::unstructured(n)
9393
C <- us$corr(corr_transf)

glmmTMB/man/reexports.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

glmmTMB/man/spider_long.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)