From 22015130b99cbfbdfc496b1f2db7f202ed40fc6c Mon Sep 17 00:00:00 2001 From: "Carter T. Butts" Date: Wed, 4 Dec 2024 03:10:33 -0800 Subject: [PATCH] Made various updates in advance of the v19 release. Most are to appease the CRAN gods. For now, I've replaced currently defunct Pajek URLs with Internet Archive equivalents; this will hopefully work for at least the medium term. I also fixed a bug in which a bad value of edge.check was passed by some constructors to add.edge/add.edges. This did not actually produce a problem under normal circumstances (which is why it was not caught), but more stringent checking implemented by the CRAN folks flagged it. add.edge(s) now validates that argument more carefully, defaulting as usual to FALSE. --- ChangeLog | 7 +++++++ DESCRIPTION | 2 +- R/access.R | 6 ++++-- R/fileio.R | 6 +++--- man/read.paj.Rd | 6 +++--- 5 files changed, 18 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index d283674..1669b9d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,11 @@ CHANGELOG: +v1.19.0 + - Non-visible and documentation changes for CRAN compliance. + - Internal argument handling changes; should generally be invisible, but + may in some complex cases avoid problems when calling network(). + - Bolstered add.edge and add.edges against improper edge.check arguments. + - Made get.inducedSubgraph() and permute.vertexIDs() generic. + - Replaced now non-functional Pajek URLs with Internet Archive versions. v1.18.2 - Non-visible changes for CRAN compliance. v1.18.1 diff --git a/DESCRIPTION b/DESCRIPTION index 0553e41..200b8fe 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: network Version: 1.19.0 -Date: 2023-12-04 +Date: 2024-12-04 Title: Classes for Relational Data Authors@R: c( person("Carter T.", "Butts", role=c("aut","cre"), email="buttsc@uci.edu"), diff --git a/R/access.R b/R/access.R index 9614225..943ffdf 100644 --- a/R/access.R +++ b/R/access.R @@ -6,7 +6,7 @@ # David Hunter and Mark S. Handcock # . # -# Last Modified 06/06/21 +# Last Modified 12/04/24 # Licensed under the GNU General Public License version 2 (June, 1991) # or greater # @@ -152,6 +152,8 @@ add.edge.network<-function(x, tail, head, names.eval=NULL, vals.eval=NULL, edge. if(.validLHS(xn,parent.frame())){ #If x not anonymous, set in calling env on.exit(eval.parent(call('<-',xn,x))) } + if(is.null(edge.check)||(length(edge.check)<1)||is.na(edge.check[1])) + edge.check<-FALSE x<-.Call(addEdge_R,x,tail,head,names.eval,vals.eval,edge.check) invisible(x) } @@ -185,7 +187,7 @@ add.edges.network<-function(x, tail, head, names.eval=NULL, vals.eval=NULL, ...) if(length(unique(c(length(tail),length(head),length(names.eval), length(vals.eval))))>1) stop("head, tail, names.eval and vals.eval lists passed to add.edges must be of the same length!\n") edge.check<-list(...)$edge.check - if(is.null(edge.check)) + if(is.null(edge.check)||(length(edge.check)<1)||is.na(edge.check[1])) edge.check<-FALSE #Pass the inputs to the C side xn<-substitute(x) diff --git a/R/fileio.R b/R/fileio.R index 0ccfc56..d0ddce9 100644 --- a/R/fileio.R +++ b/R/fileio.R @@ -126,13 +126,13 @@ #' @seealso \code{\link{network}} #' @references Batagelj, Vladimir and Mrvar, Andrej (2011) Pajek Reference #' Manual version 2.05 -#' \url{http://vlado.fmf.uni-lj.si/pub/networks/pajek/doc/pajekman.pdf} Section +#' \url{http://web.archive.org/web/20240906013709/http://vlado.fmf.uni-lj.si/pub/networks/pajek/doc/pajekman.pdf} Section #' 5.3 pp 73-79 #' #' Batageli, Vladimir (2008) "Network Analysis Description of Networks" -#' \url{http://vlado.fmf.uni-lj.si/pub/networks/doc/ECPR/08/ECPR01.pdf} +#' \url{http://web.archive.org/web/20240511173536/http://vlado.fmf.uni-lj.si/pub/networks/doc/ECPR/08/ECPR01.pdf} #' -#' Pajek Datasets \url{http://vlado.fmf.uni-lj.si/pub/networks/data/esna/} +#' Pajek Datasets \url{http://web.archive.org/web/20240411203537/http://vlado.fmf.uni-lj.si/pub/networks/data/esna} #' @keywords datasets #' @examples #' diff --git a/man/read.paj.Rd b/man/read.paj.Rd index ce7668f..7666491 100644 --- a/man/read.paj.Rd +++ b/man/read.paj.Rd @@ -125,13 +125,13 @@ read.paj('http://vlado.fmf.uni-lj.si/vlado/podstat/AO/net/Tina.paj') \references{ Batagelj, Vladimir and Mrvar, Andrej (2011) Pajek Reference Manual version 2.05 -\url{http://vlado.fmf.uni-lj.si/pub/networks/pajek/doc/pajekman.pdf} Section +\url{http://web.archive.org/web/20240906013709/http://vlado.fmf.uni-lj.si/pub/networks/pajek/doc/pajekman.pdf} Section 5.3 pp 73-79 Batageli, Vladimir (2008) "Network Analysis Description of Networks" -\url{http://vlado.fmf.uni-lj.si/pub/networks/doc/ECPR/08/ECPR01.pdf} +\url{http://web.archive.org/web/20240511173536/http://vlado.fmf.uni-lj.si/pub/networks/doc/ECPR/08/ECPR01.pdf} -Pajek Datasets \url{http://vlado.fmf.uni-lj.si/pub/networks/data/esna/} +Pajek Datasets \url{http://web.archive.org/web/20240411203537/http://vlado.fmf.uni-lj.si/pub/networks/data/esna} } \seealso{ \code{\link{network}}