-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_development.Rmd
More file actions
112 lines (83 loc) · 3.23 KB
/
Copy path_development.Rmd
File metadata and controls
112 lines (83 loc) · 3.23 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
---
title: "Package Development"
author: "Armin Rauschenberger"
date: "`r Sys.Date()`"
output: html_document
editor_options:
chunk_output_type: console
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# Initialisation
```{r,eval=FALSE}
rm(list=ls(all.names=TRUE))
setwd("C:/Users/arauschenberger/Desktop/corila/package")
devtools::load_all()
#install.packages(c("roxygen2","pkgdown","rcmdcheck","usethis","remotes","testthat","devtools","goodpractice","checkglobals","roxylint", "cyclocomp"))
#remotes::install_github(c("ropensci-review-tools/pkgcheck","ropensci-review-tools/autotest","ropensci-review-tools/srr"))
#setwd("/Users/armin.rauschenberger/Desktop/corila/package")
```
# Set-up
```{r}
#usethis::use_github_action("check-standard")
#usethis::use_github_action("lint")
#usethis::use_spell_check(lang = "en-GB")
#usethis::use_gpl3_license()
#usethis::use_data_raw("data")
```
# Checks
```{r}
#devtools::check()
roxygen2::roxygenise()
lintr::lint_package()
rcmdcheck::rcmdcheck()
devtools::spell_check()
checkglobals::checkglobals(pkg=".")
pkgdown::check_pkgdown()
x <- cyclocomp::cyclocomp_package_dir()
#devtools::build()
#devtools::submit_cran()
#pkgdown::build_site()
# checks for rOpenSci
checks <- setdiff(goodpractice::all_checks(), c("covr", "cyclocomp"))
checks <- checks[!grepl(pattern="rcmdcheck_", x = checks)]
x <- goodpractice::gp(checks = checks)
print(x, positions_limit = 20)
urlchecker::url_check()
x <- pkgcheck::pkgcheck(goodpractice=FALSE)
# autotest all functions at once
notes <- autotest::autotest_package(exclude = c(""),test=TRUE)
extra <- autotest::autotest_package(functions= ".folds",test=TRUE)
# autotest functions one-by-one
list <- rcompendium::get_all_functions()
functions <- gsub(x = c(list$external, list$internal[-c(1, 25, 26)]), pattern = "\\(\\)", replacement = "")
notes <- list()
for(i in seq_along(functions)){
cat("function ", functions[i], "\n")
notes[[i]] <- autotest::autotest_package(functions = functions[i],test=TRUE)
}
data.frame(notes)[which(notes$type == "error"),c("type", "test_name", "fn_name", "parameter", "parameter_type", "operation", "content")]
data.frame(notes)[which(notes$fn_name==".is_adjacent"),][1, ]
notes[notes$content=="is case dependent",]
data.frame(notes[notes$fn_name=="cv.corila",])
note <- autotest::autotest_package(functions="cv.corila",test=TRUE)
#srr::srr_stats_roxygen(category = c("ml", "regression"))
#devtools::install()
.rs.restartR()
```
# Some notes on sparse correlation matrices
```{r, eval = FALSE}
group <- rep(x = seq_len(50), each = 5)
p <- length(group)
sigma <- 0.8*outer(group, group, "==") + 0.2 * diag(p)
mean <- rep(x = 0, times = p)
x <- mvtnorm::rmvnorm(n = 100, mean = mean, sigma = sigma)
model <- RSC::rsc_cv(x,)
fit <- RSC::rsc(model, threshold = "minimum")
cor <- as.matrix(fit)
image(cor)
```
# Setting up a private GitLab mirror of a private GitHub repository:
- Generate fine-grained personal access token (PAT) in GitHub developer settings (repository access: specific repository; repository permissions: read-access to content, i.e., code and metadata).
- Configure private pull mirror in GitLab repository settings (<https://github.com/username/repository.git>, indicating the GitHub username and the GitHub PAT as a password).