Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
stewid committed Nov 2, 2019
1 parent 419e6af commit b2348eb
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 38 deletions.
19 changes: 4 additions & 15 deletions R/EpiContactTrace-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@
##' disease control and riskbased surveillance. Preventive Veterinary
##' Medicine 99 (2011) 78-90, doi: 10.1016/j.prevetmed.2010.12.009
##' }
##' @note Plots are not supported in version 0.8.6 since igraph0 has
##' been archived. We intend to resolve the issue in a future
##' version. Install version 0.8.5 and igraph0 manually from the
##' archive if plots are required. See section 6.3 in 'R Installation
##' and Administration' on how to install packages from source.
##' @keywords package
##' @import methods
##' @useDynLib EpiContactTrace, .registration=TRUE
Expand Down Expand Up @@ -132,16 +127,10 @@ NULL
##' }
##' @keywords datasets
##' @examples
##'
##' \dontrun{
##' data(transfers)
##'
##' contactTrace <- Trace(movements=transfers,
##' root=2645,
##' tEnd='2005-10-31',
##' days=90)
##'
##' show(contactTrace)
##' }
##'
##' Trace(movements = transfers,
##' root = 2645,
##' tEnd = "2005-10-31",
##' days = 90)
NULL
4 changes: 1 addition & 3 deletions R/trace.R
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ is_wholenumber <- function(x, tol = .Machine$double.eps^0.5) {
##' identical(trace_1, trace_2)
##'
##' ## Show result of contact tracing
##' show(trace_1)
##' trace_1
##'
##' ## Create a network summary for all included herds
##' ## First extract all source and destination from the dataset
Expand All @@ -158,8 +158,6 @@ is_wholenumber <- function(x, tol = .Machine$double.eps^0.5) {
##'
##' ## Check that the result is identical
##' identical(trace_3, trace_4)
##'
##' NetworkSummary(trace_3)
Trace <- function(movements,
root,
tEnd = NULL,
Expand Down
7 changes: 0 additions & 7 deletions man/EpiContactTrace-package.Rd

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

4 changes: 1 addition & 3 deletions man/Trace.Rd

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

14 changes: 4 additions & 10 deletions man/transfers.Rd

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

1 comment on commit b2348eb

@lintr-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

R/network-summary.R:262:1: style: functions should have cyclomatic complexity of less than 15, this has 38.

setMethod("NetworkSummary",
^

R/report.R:74:1: style: Lines should not be more than 80 characters.

​    as.character(unlist(by(contacts, sprintf("%s - %s", contacts$lhs, contacts$rhs), function(x) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/report.R:79:1: style: Lines should not be more than 80 characters.

​                   sprintf('<h3><a name="%s-%s-%s">%s %s %s</a></h3>', direction,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/report.R:82:1: style: Lines should not be more than 80 characters.

"<tr><th>Date</th><th>Id</th><th>N</th><th>Category</th><th>Source</th><th>Destination</th></tr>")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/report.R:142:1: style: Lines should not be more than 80 characters.

lines <- c(lines, "<p>No ingoing contacts during the search period.</p>")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/report.R:276:1: style: Lines should not be more than 80 characters.

##' @param template the Sweave template file to use. If none is provided, the default
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/report.R:369:38: style: Put spaces around all infix operators.

​              Sweave(template, syntax="SweaveSyntaxNoweb")
                                    ~^~

R/shortest-paths.R:169:1: style: functions should have cyclomatic complexity of less than 15, this has 41.

setMethod("ShortestPaths",
^

R/trace.R:161:1: style: functions should have cyclomatic complexity of less than 15, this has 56.

Trace <- function(movements,
^

R/tree.R:135:1: style: functions should have cyclomatic complexity of less than 15, this has 48.

position_tree <- function(tree,
^

Please sign in to comment.