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 6fa653d commit da55652
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
12 changes: 7 additions & 5 deletions R/report.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ html_contacts_table <- function(x, direction, arrow) {
## link
lines <- c(lines,
sprintf('<h3><a name="%s-%s-%s">%s %s %s</a></h3>',
direction, x$lhs[1], x$rhs[1], x$lhs[1], arrow, x$rhs[1]),
direction, x$lhs[1], x$rhs[1],
x$lhs[1], arrow, x$rhs[1]),
"<table border=1>",
"<tr>",
"<th>Date</th>",
Expand Down Expand Up @@ -148,7 +149,8 @@ html_report <- function(x) {

lines <- c(lines, html_summary_table(df, "in"))
} else {
lines <- c(lines, "<p>No ingoing contacts during the search period.</p>")
lines <- c(lines,
"<p>No ingoing contacts during the search period.</p>")
}

lines <- c(lines,
Expand Down Expand Up @@ -280,8 +282,8 @@ html_report <- function(x) {
##' }
##' @param object the object
##' @param ... Additional arguments to the method
##' @param format the format to use, can be either 'html' or 'pdf'. The default
##' is 'html'
##' @param format the format to use, can be either 'html' or
##' 'pdf'. The default is 'html'
##' @param dir the generated report is written to the directory
##' folder. The default (\code{"."}) is the current working
##' directory.
Expand Down Expand Up @@ -370,7 +372,7 @@ setMethod("Report",
package = "EpiContactTrace")
}

Sweave(template, syntax="SweaveSyntaxNoweb")
Sweave(template, syntax = "SweaveSyntaxNoweb")
texi2pdf(sub("rnw$", "tex", basename(template)), clean = TRUE)
file.rename(sub("rnw$", "pdf", basename(template)),
sprintf("%s.pdf", object@root))
Expand Down
4 changes: 2 additions & 2 deletions man/Report-methods.Rd

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

1 comment on commit da55652

@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:290: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/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.