From d4e2ab51223632a6754d599c6d26be0c5e9b0297 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98ystein=20S=C3=B8rensen?= Date: Wed, 11 Oct 2023 13:36:52 +0200 Subject: [PATCH] styling --- R/galamm.R | 6 +++--- dev-scripts/sanitize.R | 2 +- tests/testthat/test-galamm-semiparametric.R | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/R/galamm.R b/R/galamm.R index d83d6227..a7e3a138 100644 --- a/R/galamm.R +++ b/R/galamm.R @@ -393,9 +393,9 @@ galamm <- function(formula, weights = NULL, data, family = gaussian, } else { gobj$lmod$reTrms$Zt@x <- as.numeric(Map(function(l, x) sum(pars[l + 2L] * x), - l = lambda_mappings$lambda_mapping_Zt, - x = lambda_mappings$lambda_mapping_Zt_covs - )) + l = lambda_mappings$lambda_mapping_Zt, + x = lambda_mappings$lambda_mapping_Zt_covs + )) } } diff --git a/dev-scripts/sanitize.R b/dev-scripts/sanitize.R index f906f932..be539b41 100644 --- a/dev-scripts/sanitize.R +++ b/dev-scripts/sanitize.R @@ -141,4 +141,4 @@ gr <- function(par, gradient, hessian = FALSE) { par_init <- set_initial_values(gobj, start, beta_inds, lambda_inds, weights_inds) -fn(par_init, F) +fn(par_init, T) diff --git a/tests/testthat/test-galamm-semiparametric.R b/tests/testthat/test-galamm-semiparametric.R index d8285fb4..51738ff2 100644 --- a/tests/testthat/test-galamm-semiparametric.R +++ b/tests/testthat/test-galamm-semiparametric.R @@ -344,7 +344,8 @@ test_that("GAMM with factor structures and random effects works", { test_that("galamm with by variables and loadings works", { dat <- subset( cognition, - domain %in% c(1, 3) & item %in% c("11", "12", "31", "32")) + domain %in% c(1, 3) & item %in% c("11", "12", "31", "32") + ) dat <- cbind( dat, model.matrix(~ 0 + domain, data = dat)[, c("domain1", "domain3")]