diff --git a/.Rbuildignore b/.Rbuildignore index 96dbe6fb..9ca4a567 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -8,3 +8,4 @@ ^docs$ ^pkgdown$ ^cran-comments\.md$ +^CRAN-RELEASE$ diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 660fc017..12519692 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -2,18 +2,18 @@ # Checklist: -- [ ] PR form - - [ ] I have given this pull request an informative title - - [ ] Description above itemizes changes under subtitles, e.g. "## Collection"" +- PR form + - [ ] This pull request has an informative title + - [ ] Description above itemizes changes under subtitles, e.g. "## Data"" - [ ] Any closed, fixed, or related issues are referenced and explained in the description above, e.g. "Fixed #0 by adding A" - [ ] Package builds on my OS without issues -- [ ] PR checks all pass for latest commit +- PR checks all pass for latest commit + - [ ] CodeFactor check: Package improves or maintains good style - [ ] Package builds on Mac - [ ] Package builds on Windows - [ ] Package builds on Linux - [ ] CodeCov check: Package improves or maintains good test coverage - - [ ] CodeFactor check: Package improves or maintains good style -- [ ] Documentation +- Documentation - [ ] Any new or modified functions or data have roxygen style documentation in their .R scripts - [ ] Any longer functions are commented inline so that it is easier to debug in the future - [ ] PR description above and the NEWS.md file are aligned diff --git a/DESCRIPTION b/DESCRIPTION index cdfe4af7..522ecbcd 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: migraph Title: Multimodal and Multilevel Network Analysis -Version: 0.6.1 -Date: 2021-04-11 +Version: 0.6.2 +Date: 2021-04-13 Description: A set of tools that extend common social network analysis packages for analysing multimodal and multilevel networks. It includes functions for one- and two-mode (and sometimes three-mode) diff --git a/LICENSE b/LICENSE index 2d0b6fb6..85488707 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,2 @@ -MIT License - -Copyright (c) 2020 James Hollway - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +YEAR: 2020 +COPYRIGHT HOLDER: James Hollway diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 00000000..f4812275 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +# MIT License + +Copyright (c) 2021 James Hollway + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/NEWS.md b/NEWS.md index 7dfa4581..4f58048f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,13 @@ +# migraph 0.6.2 + +2021-04-13 + +## Package + +* Reran `usethis::use_mit_license("James Hollway")`. MIT License file now contains only the standard two lines. +* Removed `\dontrun` from examples. `netlm()` now runs in <5 seconds. +* Fixed missing website item + # migraph 0.6.1 2021-04-11 diff --git a/R/create.R b/R/create.R index 2c2bfcaa..97032971 100644 --- a/R/create.R +++ b/R/create.R @@ -154,9 +154,7 @@ roll_over <- function(w){ #' #' @importFrom tidygraph as_tbl_graph #' #' @importFrom igraph graph_from_incidence_matrix #' #' @examples -#' #' \dontrun{ #' #' create_nest(10, 12) -#' #' } #' #' @export #' create_nest <- function(n1, n2, #' as = c("tidygraph", "igraph", "matrix")) { @@ -176,9 +174,7 @@ roll_over <- function(w){ #' #' @importFrom tidygraph as_tbl_graph #' #' @importFrom igraph graph_from_incidence_matrix #' #' @examples -#' #' \dontrun{ #' #' create_star(1, 12) -#' #'} #' #' @export #' create_star <- function(n1 = 1, n2, #' as = c("tidygraph", "igraph", "matrix")){ diff --git a/R/netlm.R b/R/netlm.R index bc388f0c..af861d03 100644 --- a/R/netlm.R +++ b/R/netlm.R @@ -10,13 +10,12 @@ #' @importFrom purrr map #' @importFrom stats lm #' @examples -#' \dontrun{ #' mat1 <- matrix(c(0,1,1,0,0,1,1,1),4,2) #' mat2 <- matrix(c(0,1,0,1,0,1,0,1),4,2) #' mat3 <- matrix(c(0,0,1,1,0,0,1,1),4,2) #' lmat <- list(mat1 = mat1, mat2 = mat2, mat3 = mat3) -#' example <- netlm(mat1 ~ mat2 + mat3 + lmat) -#' } +#' model1 <- netlm(mat1 ~ mat2 + mat3, lmat) +#' summary(model1) #' @export netlm <- function(formula, data, ...){ @@ -40,15 +39,6 @@ netlm <- function(formula, data, ...){ #' By default, reps=1000. #' @param ... Arguments passed on to `lm()`. #' @importFrom stats ecdf lm -#' @examples -#' \dontrun{ -#' mat1 <- matrix(c(0,1,1,0,0,1,1,1),4,2) -#' mat2 <- matrix(c(0,1,0,1,0,1,0,1),4,2) -#' mat3 <- matrix(c(0,0,1,1,0,0,1,1),4,2) -#' lmat <- list(mat1 = mat1, mat2 = mat2, mat3 = mat3) -#' example <- netlm(mat1 ~ mat2 + mat3 + lmat) -#' summary.netlm(example) -#' } #' @export summary.netlm <- function(object, reps = 1000, ...){ @@ -115,16 +105,6 @@ summary.netlm <- function(object, reps = 1000, ...){ #' @param digits the number of significant digits to use when printing. #' @param signif.stars logical. If TRUE, ‘significance stars’ are printed for each coefficient. #' @importFrom stats printCoefmat -#' @examples -#' \dontrun{ -#' mat1 <- matrix(c(0,1,1,0,0,1,1,1),4,2) -#' mat2 <- matrix(c(0,1,0,1,0,1,0,1),4,2) -#' mat3 <- matrix(c(0,0,1,1,0,0,1,1),4,2) -#' lmat <- list(mat1 = mat1, mat2 = mat2, mat3 = mat3) -#' example <- netlm(mat1 ~ mat2 + mat3 + lmat) -#' summary.netlm(example) -#' print.summary.netlm(example) -#' } #' @export print.summary.netlm <- function(x, digits = max(3, getOption("digits") - 3), diff --git a/cran-comments.md b/cran-comments.md index 320689da..01207610 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -11,4 +11,5 @@ 0 errors | 0 warnings | 0 notes -* This is a new release. +* Reran `usethis::use_mit_license("James Hollway")`. MIT License file now contains only the standard two lines. +* Removed `\dontrun` from examples. `netlm()` now runs in <5 seconds. diff --git a/pkgdown/_pkgdown.yml b/pkgdown/_pkgdown.yml index d99e5566..348224a9 100644 --- a/pkgdown/_pkgdown.yml +++ b/pkgdown/_pkgdown.yml @@ -1,4 +1,4 @@ -url: https://jhollway.github.io/migraph/ +url: https://snlab-ch.github.io/migraph/ development: mode: auto template: @@ -59,4 +59,4 @@ reference: desc: "Functions for modelling multimodal and multilevel networks:" contents: - netlm - - blockmodel + - starts_with("blockmodel")