Skip to content

Commit

Permalink
Code style
Browse files Browse the repository at this point in the history
  • Loading branch information
stewid committed Nov 2, 2019
1 parent f875889 commit 330be04
Showing 1 changed file with 268 additions and 256 deletions.

1 comment on commit 330be04

@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-structure.R:135:1: style: Lines should not be more than 80 characters.

i <- tmp[seq_len(length(tmp) - 1)] != tmp[seq_len(length(tmp))[-1]]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

setMethod("NetworkSummary",
^

R/out-degree.R:119:1: style: Lines should not be more than 80 characters.

##'     Get the OutDegree for a data.frame with movements, see details and examples.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/outgoing-contact-chain.R:67:1: style: Lines should not be more than 80 characters.

##'     The \code{\link{OutgoingContactChain}} of the root within the time-interval
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/outgoing-contact-chain.R:77:1: style: Lines should not be more than 80 characters.

##'     Get the OutgoingContactChain for a data.frame with movements, see examples.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/outgoing-contact-chain.R:137:1: style: Lines should not be more than 80 characters.

​                  stop("Unable to determine OutgoingContactChain for ingoing contacts")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

tree$ingoing$bg <- ifelse(tree$ingoing$level > 0, "white", "black")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/plot.R:95:1: style: Lines should not be more than 80 characters.

tree$outgoing$bg <- ifelse(tree$outgoing$level > 0, "gray", "black")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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:163: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.