Skip to content

Commit c96a839

Browse files
author
derek-corcoran-barrios
committed
Tests mostly ready
1 parent c3cc5c8 commit c96a839

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+21614
-44
lines changed

.RData

0 Bytes
Binary file not shown.

.Rhistory

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,3 @@
1-
#Simular una base de datos como la que tiene Pame
2-
m <- matrix(rbinom(100, size = 1, prob = 0.3), ncol = 10, byrow = T) %>% as.data.frame() %>% tibble::rowid_to_column()
3-
## Transformar en red
4-
Mat <- network::as.network(as.matrix(m[,-1]))
5-
Mat
6-
Adjacency <- as.matrix.network.adjacency(Mat)
7-
Adjacency
8-
library(network)
9-
library(igraph)
10-
library(tidyverse)
11-
set.seed(2020)
12-
#Simular una base de datos como la que tiene Pame
13-
m <- matrix(rbinom(100, size = 1, prob = 0.3), ncol = 10, byrow = T) %>%
14-
as.data.frame() %>%
15-
tibble::rowid_to_column()
16-
View(m)
17-
library(network)
18-
library(tidyverse)
19-
set.seed(2020)
20-
#Simular una base de datos como la que tiene Pame
21-
m <- matrix(rbinom(100, size = 1, prob = 0.3), ncol = 10, byrow = T) %>%
22-
as.data.frame() %>%
23-
tibble::rowid_to_column()
241
## Transformar en red
252
Mat <- network::as.network(as.matrix(m[,-1]))
263
Adjacency <- as.matrix.network.adjacency(Mat)
@@ -510,3 +487,26 @@ library(NetworkExtinction)
510487
install.packages("pkgdown")
511488
install.packages("ragg")
512489
install.packages("ragg")
490+
library(NetworkExtinction)
491+
library(NetworkExtinction)
492+
install.packages("cranlogs")
493+
?cranlogs::cran_downloads()
494+
NetExt <- cran_downloads(packages = "NetworkExtinction",from = "2014-06-30", to = "2022-11-22")
495+
library(cranlogs)
496+
NetExt <- cran_downloads(packages = "NetworkExtinction",from = "2014-06-30", to = "2022-11-22")
497+
NetExt
498+
NetExt$count
499+
NetExt$count %>% hist
500+
NetExt$count |> hist
501+
NetExt$count |> hist()
502+
NetExt$count |> sum()
503+
sum(NetExt$count)
504+
NetExt <- cran_downloads(packages = "NetworkExtinction", when = "last-month")
505+
sum(NetExt$count)
506+
View(NetExt)
507+
NetExt <- cran_downloads(packages = "NetworkExtinction",from = "2014-06-30", to = "2022-11-22")
508+
list.files(path = "data/")
509+
citation("splines")
510+
covr::code_coverage()
511+
covr::package_coverage()
512+
covr::package_coverage()

.Rproj.user/shared/notebooks/paths

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
/home/au687614/Documents/NetworkExtinction/R/Extintions.R="5517A387"
12
/home/au687614/Documents/NetworkExtinction/README.Rmd="BEC06318"
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
9+
name: test-coverage
10+
11+
jobs:
12+
test-coverage:
13+
runs-on: ubuntu-latest
14+
env:
15+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
20+
- uses: r-lib/actions/setup-r@v2
21+
with:
22+
use-public-rspm: true
23+
24+
- uses: r-lib/actions/setup-r-dependencies@v2
25+
with:
26+
extra-packages: any::covr
27+
needs: coverage
28+
29+
- name: Test coverage
30+
run: |
31+
covr::codecov(
32+
quiet = FALSE,
33+
clean = FALSE,
34+
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
35+
)
36+
shell: Rscript {0}
37+
38+
- name: Show testthat output
39+
if: always()
40+
run: |
41+
## --------------------------------------------------------------------
42+
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
43+
shell: bash
44+
45+
- name: Upload test results
46+
if: failure()
47+
uses: actions/upload-artifact@v3
48+
with:
49+
name: coverage-test-failures
50+
path: ${{ runner.temp }}/package

DESCRIPTION

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@ Imports: broom, doParallel, dplyr, foreach, ggplot2, igraph, magrittr, network,
1616
License: GPL (>= 2)
1717
Encoding: UTF-8
1818
LazyData: true
19-
RoxygenNote: 7.2.1
19+
RoxygenNote: 7.2.2
2020
Suggests:
2121
knitr,
2222
rmarkdown,
23-
pkgdown
23+
pkgdown,
24+
testthat (>= 3.0.0)
2425
VignetteBuilder: knitr
26+
Config/testthat/edition: 3

NAMESPACE

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ importFrom(igraph,as.undirected)
4444
importFrom(igraph,cluster_edge_betweenness)
4545
importFrom(igraph,cluster_infomap)
4646
importFrom(igraph,cluster_label_prop)
47-
importFrom(igraph,cluster_spinglass)
4847
importFrom(igraph,graph_from_adjacency_matrix)
4948
importFrom(igraph,modularity)
5049
importFrom(magrittr,"%>%")

0 commit comments

Comments
 (0)