The likelihood for a linear model is given by:
To derive the computation of the log-likelihood used in stats::logLik.lm we first need to incorporate weights.
From ?lm
The likelihood for a linear model is given by:
To derive the computation of the log-likelihood used in stats::logLik.lm we first need to incorporate weights.
From ?lm
| library(microbenchmark) | |
| # Examples where explictly typing with "L" is more efficient | |
| ## create a reasonably large matrix | |
| r <- 5000 | |
| c <- 100 | |
| ints <- sample(0:10, r*c, replace = TRUE) | |
| M <- matrix(ints, nr = r, nc = c) |
This gist provides a workaround proposed by Andrzej K. Oleś (@aoles) to use pkgdown with vignettes formatted with
Biocstyle::html_document2 or bookdown::html_document2, see r-lib/pkgdown#323.
Copy extra.css to pkgdown/extra.css in your package sources (i.e. pkgdown is a top-level directory alongside R, man, etc) or
merge with your existing extra.css.
Source build_rmarkdown_format.R before calling build_site() or build_articles(). Note build_site must be called to
copy extra.css to docs, so must be used the first time extra.css is added or any time it is modified for the changes to
take effect.
| #' Post-process pkgdown Version of Biocstyle Vignette | |
| #' | |
| #' Takes HTML vignette rendered by [pkgdown::build_articles()] from R markdown | |
| #' using [BiocStyle::html_document2()] and post-processes it to fix | |
| #' features not supported by [rmarkdown::render()] (used by `build_articles` | |
| #' under the hood). | |
| #' | |
| #' In order to match the table and figure references to the correct table or | |
| #' figure, the function requires both the HTML rendered by | |
| #' [pkgdown::build_articles()] and the version rendered by |