Skip to content

Commit 709f518

Browse files
authored
Merge pull request #72 from jhollway/develop
Framework changes
2 parents b236128 + 910e77e commit 709f518

Some content is hidden

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

43 files changed

+275
-1945
lines changed

.Rbuildignore

+3
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@
44
^\.Rproj\.user$
55
^working$
66
^\.github$
7+
^data-raw$
8+
^docs$
9+
^pkgdown$

.github/workflows/prchecks.yml

+10-9
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
config:
1717
- {os: macOS-latest, r: 'release', artifact_name: '*.tar.gz', asset_name: macOS}
1818
- {os: windows-latest, r: 'release', artifact_name: '*.zip', asset_name: winOS}
19-
# - {os: ubuntu-18.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest", artifact_name: '*.tar.gz', asset_name: linuxOS}
19+
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest", artifact_name: '*.tar.gz', asset_name: linuxOS}
2020

2121
env:
2222
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
@@ -46,22 +46,23 @@ jobs:
4646
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
4747
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
4848

49-
#- name: Install system dependencies
50-
# if: runner.os == 'Linux'
51-
# env:
52-
# RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
53-
# run: |
54-
# Rscript -e "remotes::install_github('r-hub/sysreqs')"
55-
# sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
56-
# sudo -s eval "$sysreqs"
49+
- name: Install system dependencies
50+
if: runner.os == 'Linux'
51+
run: |
52+
while read -r cmd
53+
do
54+
eval sudo $cmd
55+
done < <(Rscript -e 'cat(remotes::system_requirements("ubuntu", "20.04"), sep = "\n")')
5756
5857
- name: Install dependencies
5958
run: |
6059
remotes::install_deps(dependencies = TRUE)
6160
remotes::install_cran("pkgbuild")
6261
shell: Rscript {0}
62+
6363
- name: Document
6464
run: Rscript -e 'roxygen2::roxygenise()'
65+
6566
- name: Binary
6667
run: |
6768
pkgbuild::clean_dll()

.github/workflows/pushrelease.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ jobs:
118118
run: ls -R
119119

120120
- name: Rename Mac release
121-
run: mv ./macOS/*.tgz roctopus_macOS.tgz
121+
run: mv ./macOS/*.tgz migraph_macOS.tgz
122122

123123
- name: Upload Mac binary
124124
id: upload-mac
@@ -127,12 +127,12 @@ jobs:
127127
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
128128
with:
129129
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
130-
asset_path: roctopus_macOS.tgz
131-
asset_name: roctopus_macOS.tgz
130+
asset_path: migraph_macOS.tgz
131+
asset_name: migraph_macOS.tgz
132132
asset_content_type: application/zip
133133

134134
- name: Rename Linux release
135-
run: mv ./linuxOS/*.tar.gz roctopus_linuxOS.tar.gz
135+
run: mv ./linuxOS/*.tar.gz migraph_linuxOS.tar.gz
136136

137137
- name: Upload Linux binary
138138
id: upload-lin
@@ -141,12 +141,12 @@ jobs:
141141
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
142142
with:
143143
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
144-
asset_path: roctopus_linuxOS.tar.gz
145-
asset_name: roctopus_linuxOS.tar.gz
144+
asset_path: migraph_linuxOS.tar.gz
145+
asset_name: migraph_linuxOS.tar.gz
146146
asset_content_type: application/zip
147147

148148
- name: Rename Windows release
149-
run: mv ./winOS/*.zip roctopus_winOS.zip
149+
run: mv ./winOS/*.zip migraph_winOS.zip
150150

151151
- name: Upload Windows binary
152152
id: upload-win
@@ -155,6 +155,6 @@ jobs:
155155
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
156156
with:
157157
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
158-
asset_path: roctopus_winOS.zip
159-
asset_name: roctopus_winOS.zip
158+
asset_path: migraph_winOS.zip
159+
asset_name: migraph_winOS.zip
160160
asset_content_type: application/zip

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ inst/doc
66
*.Rd
77
data-raw/*
88
docs/
9+
working/*

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Description: This package assembles a number of utility functions for
66
URL: https://github.com/jhollway/migraph
77
BugReports: https://github.com/jhollway/migraph/issues
88
Depends: R (>= 3.4.0)
9-
License: MIT
9+
License: MIT + file LICENSE
1010
Encoding: UTF-8
1111
LazyData: true
1212
RoxygenNote: 7.1.1

NAMESPACE

+10-30
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,17 @@
11
# Generated by roxygen2: do not edit by hand
22

3-
export(centrality_betweenness)
4-
export(centrality_closeness)
5-
export(centrality_degree)
6-
export(col_project)
3+
export(as_incidence_matrix)
74
export(create_chain)
85
export(create_match)
96
export(create_nest)
107
export(create_silos)
11-
export(df_to_mat)
12-
export(netlm2)
138
export(play_twomode)
14-
export(plot_2x2)
15-
export(plot_globalnet)
16-
export(plot_multilevel)
17-
export(plot_twomode)
18-
export(project_list)
19-
export(row_project)
20-
export(threemode_clustering)
21-
export(twomode_2x2)
22-
export(twomode_centrality_degree)
23-
export(twomode_centralization_betweeness)
24-
export(twomode_centralization_closeness)
25-
export(twomode_centralization_degree)
26-
export(twomode_clustering)
27-
export(twomode_coherence)
28-
export(twomode_components)
29-
export(twomode_constraint)
30-
export(twomode_dominance)
31-
export(twomode_modularity)
32-
export(twomode_smallworld)
33-
import(geosphere)
34-
import(ggplot2)
35-
import(igraph)
36-
import(threejs)
37-
import(tidyverse)
9+
export(project_cols)
10+
export(project_rows)
11+
importFrom(igraph,as.igraph)
12+
importFrom(igraph,as_adjacency_matrix)
13+
importFrom(igraph,bipartite.projection)
14+
importFrom(igraph,graph_from_incidence_matrix)
15+
importFrom(tidygraph,as_tbl_graph)
16+
importFrom(tidygraph,is.tbl_graph)
17+
importFrom(tidygraph,play_bipartite)

NEWS.md

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
# migraph 0.4.0
22

3-
2020-12-21
3+
2021-01-08
44

55
## Package
66

77
* Package name change from roctopus to `{migraph}`
8+
* Closed #50 with new logo
9+
* Now builds Linux binary too
810

9-
## Analysis
11+
## Manipulation
1012

11-
* Added `centrality_degree()` to mask tidygraph function with correctly normalised two-mode calculation
12-
* Added `centrality_closeness()` to mask tidygraph function with correctly normalised two-mode calculation
13-
* Added `centrality_betweenness()` to mask tidygraph function with correctly normalised two-mode calculation
14-
* Renamed `twomode_centralization_between()` to `twomode_centralization_betweenness()`
15-
* Added `twomode_centralization_closeness()`
13+
* Added `project_rows()` and `project_cols()` to make it easier to project two-mode networks in different formats (matrix, igraph, tidygraph) into projected versions in the same format
14+
* Closed #30 with conversion from different data frame formats, e.g. weighted and unweighted edgelists, into an incidence matrix with `as_incidence_matrix()`
1615

1716
## Data
1817

R/centrality.R

-127
This file was deleted.

R/concor.R

-61
This file was deleted.

0 commit comments

Comments
 (0)