Skip to content

Commit

Permalink
Merge pull request #88 from stocnet/develop
Browse files Browse the repository at this point in the history
Update url addresses to new orga and solve some issues
  • Loading branch information
auzaheta authored Mar 13, 2024
2 parents 74481fa + 7057fa0 commit a9bb161
Show file tree
Hide file tree
Showing 92 changed files with 5,656 additions and 3,915 deletions.
52 changes: 52 additions & 0 deletions .github/OpenMP_mac.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,55 @@ SHLIB_LIBADD = -L/usr/local/lib
```

6. Installing goldfish from source should work now. Otherwise get in contact with the developer team.

### Update for M1, M2, ... machines

If you are using an M1, M2, ... machine, you could follow the previous instructions to install a `gcc` compiler and setting up the compilers for `R`.
Thanks to @eugeniagilpa, here there is an alternative version of the `Makevars` file that should work for M1, M2, ... machines:

```
XCBASE:=$(shell xcrun --show-sdk-path)
GCCBASE:=$(shell brew --prefix gcc)
GETTEXT:=$(shell brew --prefix gettext)
CC=$(GCCBASE)/bin/gcc-13
CXX=$(GCCBASE)/bin/g++-13
CXX11=$(GCCBASE)/bin/g++-13
CXX14=$(GCCBASE)/bin/g++-13
CXX17=$(GCCBASE)/bin/g++-13
CXX20=$(GCCBASE)/bin/g++-13
CXX23=$(GCCBASE)/bin/g++-13
SHLIB_CXXLD=$(GCCBASE)/bin/g++-13
FC=$(GCCBASE)/bin/gfortran
F77=$(GCCBASE)/bin/gfortran
FLIBS=-L/$(GCCBASE)/lib/gcc/13/ -lm -lgfortran
CPPFLAGS=-isystem "$(GCCBASE)/include" -isysroot "$(XCBASE)"
LDFLAGS=-L"$(GCCBASE)/lib" -L"$(GETTEXT)/lib" --sysroot="$(XCBASE)"
MAKE=make -j8
SHLIB_OPENMP_CFLAGS=-fopenmp
SHLIB_OPENMP_CXXFLAGS=-fopenmp
SHLIB_OPENMP_FCFLAGS=-fopenmp
SHLIB_OPENMP_FFLAGS=-fopenmp
SHLIB_CXXLDFLAGS = -dynamiclib -Wl,-ld_classic,-headerpad_max_install_names -undefined dynamic_lookup $(CXXFLAGS) $(CXXPICFLAGS) $(LTO_LD)
SHLIB_CXX11LDFLAGS = -dynamiclib -Wl,-ld_classic,-headerpad_max_install_names -undefined dynamic_lookup $(CXX11FLAGS) $(CXX11PICFLAGS) $(LTO_LD)
SHLIB_CXX14LDFLAGS = -dynamiclib -Wl,-ld_classic,-headerpad_max_install_names -undefined dynamic_lookup $(CXX14FLAGS) $(CXX14PICFLAGS) $(LTO_LD)
SHLIB_CXX17LDFLAGS = -dynamiclib -Wl,-ld_classic,-headerpad_max_install_names -undefined dynamic_lookup $(CXX17FLAGS) $(CXX17PICFLAGS) $(LTO_LD)
SHLIB_CXX20LDFLAGS = -dynamiclib -Wl,-ld_classic,-headerpad_max_install_names -undefined dynamic_lookup $(CXX20FLAGS) $(CXX20PICFLAGS) $(LTO_LD)
SHLIB_CXX23LDFLAGS = -dynamiclib -Wl,-ld_classic,-headerpad_max_install_names -undefined dynamic_lookup $(CXX23FLAGS) $(CXX23PICFLAGS) $(LTO_LD)
SHLIB_FCLDFLAGS = -dynamiclib -Wl,-ld_classic,-headerpad_max_install_names -undefined dynamic_lookup $(FCFLAGS) $(FPICFLAGS)
SHLIB_LDFLAGS = -dynamiclib -Wl,-ld_classic,-headerpad_max_install_names -undefined dynamic_lookup $(CFLAGS) $(CPICFLAGS) $(LTO_LD)
SHLIB_LDFLAGS_R = -dynamiclib -Wl,-ld_classic,-headerpad_max_install_names -undefined dynamic_lookup $(CFLAGS) $(CPICFLAGS) $(LTO_LD)
```

In step 5 the path to the library should be:

```
SHLIB_LIBADD = -L/opt/homebrew/opt/gfortran/lib
```

Please share feedback on which of these work (shortcuts or unnecessary parts) and we will update the installation guide accordingly.
9 changes: 5 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ Encoding: UTF-8
Package: goldfish
Type: Package
Title: Statistical Network Models for Dynamic Network Data
Version: 1.6.5
Date: 2023-06-20
Version: 1.6.6
Date: 2024-03-13
Authors@R: c(person("James", "Hollway", role = c("cre", "aut", "dtc"),
email = "[email protected]",
comment = c("IHEID", ORCID = "0000-0002-8361-9647")),
Expand All @@ -28,8 +28,8 @@ Description: Tools for fitting statistical network models to dynamic network dat
Stadtfeld, Hollway, and Block (2017b) <doi:10.1177/0081175017733457>,
Stadtfeld and Block (2017) <doi:10.15195/v4.a14>,
Hoffman et al. (2020) <doi:10.1017/nws.2020.3>.
URL: https://snlab-ch.github.io/goldfish/
BugReports: https://github.com/snlab-ch/goldfish/issues
URL: https://stocnet.github.io/goldfish/
BugReports: https://github.com/snlab-ch/goldfish/issues/
Depends: R (>= 3.5.0)
Imports:
Rcpp (>= 1.0.1),
Expand All @@ -54,6 +54,7 @@ Suggests:
igraph,
ggraph,
migraph,
manynet,
broom,
lmtest
VignetteBuilder: knitr
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ S3method(print,summary.result.goldfish)
S3method(summary,result.goldfish)
S3method(tidy,result.goldfish)
S3method(vcov,result.goldfish)
export(GatherPreprocessing)
export(defineDependentEvents)
export(defineGlobalAttribute)
export(defineGroups_interaction)
Expand Down
10 changes: 10 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
# goldfish 1.6.6

* Debugging and extend documentation for `GatherPreprocessing()`.
* Fix note from CRAN checks.
* Debug issue when using a preprocess init object in `estimate()`.
* Debug issue with opportunity list in `estimate()` for `DyNAM` models.
* Fix error in printing output from `estimate()` when using
a parameter is fixed to a value.

# goldfish 1.6.5

* Solves `startTime` and `endTime` bug on `DyNAM` and `REM` models
preprocessing.
* Export `GatherPreprocessing()`. Experimental functionality.
* Clean unnecessary functions imports.
* Solves `aes_string()` deprecation.
* Solves issue on `C++` engine on DyNAM-rate.
Expand Down
62 changes: 33 additions & 29 deletions R/data_Fisheries_Treaties_6070.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#' including only bilateral agreements, fewer variables,
#' and ranging only between 1960 and 1970 inclusive.
#' This data set is only meant for testing, and not for inference.
#' It provides an example of an undirected, weighted (by integer/increment) network,
#' with composition change and both monadic and dyadic covariates.
#' It provides an example of an undirected, weighted (by integer/increment)
#' network, with composition change and both monadic and dyadic covariates.
#' Monadic variables include the dates states gain or lose sovereign status,
#' their polity score, and their GDP.
#' Dyadic variables include bilateral fisheries agreements between states,
Expand All @@ -24,38 +24,42 @@
#' See below for variables and formats.
#'
#' \tabular{lll}{
#' \strong{Object} \tab \strong{Description} \tab \strong{Format} \cr
#' states$label \tab Node identifier labels \tab character \cr
#' states$present \tab Node present in dataset \tab boolean \cr
#' states$regime \tab Placeholder for regime variable \tab numeric (NA) \cr
#' states$gdp \tab Placeholder for GDP variable \tab numeric (NA) \cr
#' sovchanges$time \tab Date of state sovereignty update \tab POSIXct \cr
#' sovchanges$node \tab Node for state sovereignty update \tab integer \cr
#' sovchanges$replace \tab State sovereignty update \tab boolean \cr
#' regchanges$time \tab Date of regime update \tab POSIXct \cr
#' regchanges$node \tab Node for regime update \tab integer \cr
#' regchanges$replace \tab Regime update \tab integer (-10--10) \cr
#' gdpchanges$time \tab Date of GDP update \tab POSIXct \cr
#' gdpchanges$node \tab Node for GDP update \tab integer \cr
#' gdpchanges$replace \tab GDP update \tab numeric \cr
#' bilatchanges$time \tab Date of bilateral change \tab POSIXct \cr
#' bilatchanges$sender \tab First bilateral change node \tab integer \cr
#' bilatchanges$receiver \tab Second bilateral change node \tab integer \cr
#' bilatchanges$increment \tab Create or dissolve action \tab numeric (-1 or 1) \cr
#' contigchanges$time \tab Date of contiguity change \tab POSIXct \cr
#' contigchanges$sender \tab First contiguity change node \tab integer \cr
#' contigchanges$receiver \tab Second contiguity change node \tab integer \cr
#' contigchanges$replace \tab New contiguity value \tab numeric \cr
#' \strong{Object} \tab \strong{Description} \tab \strong{Format} \cr
#' states$label \tab Node identifier labels \tab character \cr
#' states$present \tab Node present in dataset \tab boolean \cr
#' states$regime \tab Placeholder for regime variable \tab numeric (NA) \cr
#' states$gdp \tab Placeholder for GDP variable \tab numeric (NA) \cr
#' sovchanges$time \tab Date of state sovereignty update \tab POSIXct \cr
#' sovchanges$node \tab Node for state sovereignty update \tab integer \cr
#' sovchanges$replace \tab State sovereignty update \tab boolean \cr
#' regchanges$time \tab Date of regime update \tab POSIXct \cr
#' regchanges$node \tab Node for regime update \tab integer \cr
#' regchanges$replace \tab Regime update \tab integer (-10--10) \cr
#' gdpchanges$time \tab Date of GDP update \tab POSIXct \cr
#' gdpchanges$node \tab Node for GDP update \tab integer \cr
#' gdpchanges$replace \tab GDP update \tab numeric \cr
#' bilatchanges$time \tab Date of bilateral change \tab POSIXct \cr
#' bilatchanges$sender \tab First bilateral change node \tab integer \cr
#' bilatchanges$receiver \tab Second bilateral change node \tab integer \cr
#' bilatchanges$increment\tab Create or dissolve tie\tab numeric (-1 or 1)\cr
#' contigchanges$time \tab Date of contiguity change \tab POSIXct \cr
#' contigchanges$sender \tab First contiguity change node \tab integer \cr
#' contigchanges$receiver \tab Second contiguity change node \tab integer \cr
#' contigchanges$replace \tab New contiguity value \tab numeric \cr
#' }
#'
#' @references
#' Hollway, James, and Johan Koskinen. 2016. Multilevel Embeddedness: The Case of the Global Fisheries
#' Governance Complex. \emph{Social Networks}, 44: 281-94. doi:10.1016/j.socnet.2015.03.001.
#' Hollway, James, and Johan Koskinen. 2016.
#' Multilevel Embeddedness: The Case of the Global Fisheries Governance Complex.
#' \emph{Social Networks}, 44: 281-94. \doi{10.1016/j.socnet.2015.03.001}.
#'
#' Hollway, James, and Johan H Koskinen. 2016. Multilevel Bilateralism and Multilateralism: States' Bilateral and
#' Hollway, James, and Johan H Koskinen. 2016.
#' Multilevel Bilateralism and Multilateralism: States' Bilateral and
#' Multilateral Fisheries Treaties and Their Secretariats.
#' In \emph{Multilevel Network Analysis for the Social Sciences}, edited by Emmanuel Lazega and Tom A B Snijders,
#' 315-32. Cham: Springer International Publishing. doi:10.1007/978-3-319-24520-1_13.
#' In \emph{Multilevel Network Analysis for the Social Sciences},
#' edited by Emmanuel Lazega and Tom A B Snijders,
#' 315-32. Cham: Springer International Publishing.
#' \doi{10.1007/978-3-319-24520-1_13}.
#'
#' @keywords datasets dynamic political network states fisheries
NULL
Expand Down
48 changes: 28 additions & 20 deletions R/data_RFID_Validity_Study.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,39 @@
#' @docType data
#' @usage data(RFID_Validity_Study)
#' @format 3 dataframes: \cr
#' - participants (11 rows, 7 columns): attributes of the experiment's participants\cr
#' - rfid (1011 rows, 4 columns): dyadic interactions detected by the RFID badges (after data processing)\cr
#' - video (219 rows, 4 columns): dyadic interactions detected by the video rating\cr
#' - participants (11 rows, 7 columns):
#' attributes of the experiment's participants\cr
#' - rfid (1011 rows, 4 columns): dyadic interactions detected
#' by the RFID badges (after data processing)\cr
#' - video (219 rows, 4 columns): dyadic interactions detected
#' by the video rating\cr
#' and one network:\cr
#' - known.before (11 rows, 11 columns): network of previous acquaintances\cr
#' See below for variables and formats.\cr
#'
#'\tabular{lll}{
#' \tabular{lll}{
#' \strong{Object} \tab \strong{Description} \tab \strong{Format} \cr
#' participants$actor \tab Identifier of the actor \tab integer \cr
#' participants$label \tab (Anonymized) name \tab Factor \cr
#' participants$present \tab Presence of the actor (all actors are present) \tab logical \cr
#' participants$age \tab Actor's age \tab integer \cr
#' participants$gender \tab Actor's gender (0: male, 1: female) \tab integer \cr
#' participants$group \tab Actor's group affiliation (groups have distinct ids) \tab integer \cr
#' participants$level \tab Actor's seniority (1: MSc student, 2: PhD student, 3: PostDoc, 4: Prof)
#' \tab integer \cr
#' rfid$NodeA \tab Identifier for the first actor \tab chr \cr
#' rfid$NodeB \tab Identifier for the second actor \tab chr \cr
#' rfid$Start \tab Time of the beginning of the dyadic interaction \tab integer \cr
#' rfid$End \tab Time of the end of the dyadic interaction \tab integer \cr
#' video$NodeA \tab Identifier for the first actor \tab chr \cr
#' video$NodeB \tab Identifier for the second actor \tab chr \cr
#' video$Start \tab Time of the beginning of the dyadic interaction \tab integer \cr
#' video$End \tab Time of the end of the dyadic interaction \tab integer \cr
#' participants$actor \tab Identifier of the actor \tab integer \cr
#' participants$label \tab (Anonymized) name \tab Factor \cr
#' participants$present \tab Presence of the actor (all actors are present)
#' \tab logical \cr
#' participants$age \tab Actor's age \tab integer \cr
#' participants$gender \tab Actor's gender (0: male, 1: female)
#' \tab integer \cr
#' participants$group
#' \tab Actor's group affiliation (groups have distinct ids) \tab integer \cr
#' participants$level \tab Actor's seniority
#' (1: MSc student, 2: PhD student, 3: PostDoc, 4: Prof) \tab integer \cr
#' rfid$NodeA \tab Identifier for the first actor \tab chr \cr
#' rfid$NodeB \tab Identifier for the second actor \tab chr \cr
#' rfid$Start \tab Time of the beginning of the dyadic interaction
#' \tab integer \cr
#' rfid$End \tab Time of the end of the dyadic interaction \tab integer \cr
#' video$NodeA \tab Identifier for the first actor \tab chr \cr
#' video$NodeB \tab Identifier for the second actor \tab chr \cr
#' video$Start \tab Time of the beginning of the dyadic interaction
#' \tab integer \cr
#' video$End \tab Time of the end of the dyadic interaction \tab integer \cr
#' }
#'
#' @source \url{https://osf.io/rrhxe/}
Expand Down
38 changes: 22 additions & 16 deletions R/data_Social_Evolution.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,35 @@
#' @name Social_Evolution
#' @docType data
#' @usage data(Social_Evolution)
#' @format 3 dataframes: actors (84 rows, 4 columns), calls (439 rows, 4 columns), friendship (766 rows, 4 columns).
#' @format 3 dataframes: actors (84 rows, 4 columns),
#' calls (439 rows, 4 columns), friendship (766 rows, 4 columns).
#' See below for variables and formats.
#'
#' \tabular{lll}{
#' \strong{Object} \tab \strong{Description} \tab \strong{Format} \cr
#' actors$label \tab Actor identifier labels \tab character \cr
#' actors$present \tab Actor present in dataset \tab boolean \cr
#' actors$floor \tab Floor of residence actor lives on \tab numeric (1-9) \cr
#' actors$gradeType \tab Degree level \tab numeric (1-5) \cr
#' calls$time \tab Time and date of call \tab numeric from POSIXct \cr
#' calls$sender \tab Initiator of phone call \tab character \cr
#' calls$receiver \tab Recipient of phone call \tab character \cr
#' calls$increment \tab Indicates call number increment (all 1s) \tab numeric (1) \cr
#' friendship$time \tab Time and date of friend nomination \tab numeric from POSIXct \cr
#' friendship$sender \tab Nominator of friendship \tab character \cr
#' friendship$receiver \tab Nominee of friendship \tab character \cr
#' friendship$replace \tab Indicates friendship value at $time \tab numeric \cr
#' \strong{Object} \tab \strong{Description} \tab\strong{Format} \cr
#' actors$label \tab Actor identifier labels \tab character \cr
#' actors$present \tab Actor present in dataset \tab boolean \cr
#' actors$floor \tab Floor of residence actor lives on
#' \tab numeric (1-9) \cr
#' actors$gradeType \tab Degree level \tab numeric (1-5) \cr
#' calls$time \tab Time and date of call \tab numeric from POSIXct \cr
#' calls$sender \tab Initiator of phone call \tab character \cr
#' calls$receiver \tab Recipient of phone call \tab character \cr
#' calls$increment \tab Indicates call number increment (all 1s)
#' \tab numeric (1) \cr
#' friendship$time \tab Time and date of friend nomination
#' \tab numeric from POSIXct \cr
#' friendship$sender \tab Nominator of friendship \tab character \cr
#' friendship$receiver \tab Nominee of friendship \tab character \cr
#' friendship$replace \tab Indicates friendship value at $time
#' \tab numeric \cr
#' }
#'
#' @source \url{http://realitycommons.media.mit.edu/socialevolution.html}
#' @references
#' A. Madan, M. Cebrian, S. Moturu, K. Farrahi, A. Pentland (2012). Sensing the 'Health State' of a Community.
#' \emph{Pervasive Computing. 11}, 4, pp. 36-45.
#' A. Madan, M. Cebrian, S. Moturu, K. Farrahi, A. Pentland (2012).
#' Sensing the 'Health State' of a Community.
#' \emph{Pervasive Computing. 11}, 4, pp. 36-45. \doi{10.1109/MPRV.2011.79}.
#'
#' @keywords datasets social evolution network
NULL
Expand Down
Loading

0 comments on commit a9bb161

Please sign in to comment.