Skip to content

Commit

Permalink
Fixing neighbors.size()
Browse files Browse the repository at this point in the history
  • Loading branch information
derekmeyer37 committed Jan 19, 2024
2 parents 3611063 + 16cae00 commit 8141167
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 43 deletions.
2 changes: 0 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,13 @@ S3method(plot,epiworld_surv)
S3method(print,epiworld_agent)
S3method(print,epiworld_agents)
S3method(print,epiworld_agents_tools)
S3method(print,epiworld_agents_viruses)
S3method(print,epiworld_globalaction)
S3method(print,epiworld_model)
S3method(print,epiworld_saver)
S3method(print,epiworld_tool)
S3method(print,epiworld_tool_fun)
S3method(print,epiworld_virus)
S3method(print,epiworld_virus_fun)
S3method(print,epiworld_viruses)
S3method(queuing_off,epiworld_model)
S3method(queuing_on,epiworld_model)
S3method(queuing_on,epiworld_seirconn)
Expand Down
6 changes: 0 additions & 6 deletions R/tool.R
Original file line number Diff line number Diff line change
Expand Up @@ -475,11 +475,5 @@ print.epiworld_agents_tools <- function(x, max_print = 10, ...) {

}

#' @export
print.epiworld_viruses <- function(x, ...) {
print_agent_viruses_cpp(x)
invisible(x)
}



24 changes: 0 additions & 24 deletions R/virus.R
Original file line number Diff line number Diff line change
Expand Up @@ -536,29 +536,5 @@ set_incubation_fun <- function(virus, model, vfun) {

}

#' @export
#' @rdname virus
#' @param max_print Numeric scalar. Maximum number of viruses to print.
#' @param ... Currently ignored.
#' @param x An object of class `epiworld_agents_viruses`.
print.epiworld_agents_viruses <- function(x, max_print = 10, ...) {

for (i in 1:min(max_print, length(x))) {
print_agent_viruses_cpp(x[[i]])
}

if (length(x) > max_print) {
cat(sprintf("Showing first %s of %s viruses.\n", max_print, length(x)))
}

invisible(x)

}

#' @export
print.epiworld_viruses <- function(x, ...) {
print_agent_viruses_cpp(x)
invisible(x)
}


2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ net <- get_transmissions(sir)
# Plotting
library(epiworldR)
library(netplot)
library(epiworldR)
x <- igraph::graph_from_edgelist(
as.matrix(net[,2:3]) + 1
)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ net <- get_transmissions(sir)

# Plotting
library(epiworldR)
library(netplot)
library(epiworldR)
#> Loading required package: grid
x <- igraph::graph_from_edgelist(
as.matrix(net[,2:3]) + 1
Expand Down
9 changes: 0 additions & 9 deletions man/virus.Rd

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

0 comments on commit 8141167

Please sign in to comment.