Skip to content

Commit

Permalink
Made various updates in advance of the v19 release. Most are to appease
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
CarterButts committed Dec 4, 2024
1 parent e269878 commit 2201513
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 9 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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"),
Expand Down
6 changes: 4 additions & 2 deletions R/access.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# David Hunter <dhunter@stat.psu.edu> and Mark S. Handcock
# <handcock@u.washington.edu>.
#
# Last Modified 06/06/21
# Last Modified 12/04/24
# Licensed under the GNU General Public License version 2 (June, 1991)
# or greater
#
Expand Down Expand Up @@ -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)
}
Expand Down Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions R/fileio.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
#'
Expand Down
6 changes: 3 additions & 3 deletions man/read.paj.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2201513

Please sign in to comment.