mirror of
https://github.com/johrpan/geposan.git
synced 2025-10-26 10:47:25 +01:00
Reindent code to use just two spaces
This commit is contained in:
parent
a1e6147466
commit
c04b6337e9
17 changed files with 1583 additions and 1582 deletions
48
R/result.R
48
R/result.R
|
|
@ -10,18 +10,18 @@
|
|||
#'
|
||||
#' @export
|
||||
result <- function(method_id, scores, details = list()) {
|
||||
stopifnot(is.data.frame(scores) &
|
||||
c("gene", "score") %chin% colnames(scores))
|
||||
stopifnot(is.list(details))
|
||||
stopifnot(is.data.frame(scores) &
|
||||
c("gene", "score") %chin% colnames(scores))
|
||||
stopifnot(is.list(details))
|
||||
|
||||
structure(
|
||||
list(
|
||||
method_id = method_id,
|
||||
scores = scores,
|
||||
details = details
|
||||
),
|
||||
class = "geposan_result"
|
||||
)
|
||||
structure(
|
||||
list(
|
||||
method_id = method_id,
|
||||
scores = scores,
|
||||
details = details
|
||||
),
|
||||
class = "geposan_result"
|
||||
)
|
||||
}
|
||||
|
||||
#' Print a result object.
|
||||
|
|
@ -33,18 +33,18 @@ result <- function(method_id, scores, details = list()) {
|
|||
#'
|
||||
#' @export
|
||||
print.geposan_result <- function(x, ...) {
|
||||
cat(sprintf(
|
||||
paste0(
|
||||
"geposan result:",
|
||||
"\n Method: %s",
|
||||
"\n Number of genes: %i",
|
||||
"\n Available details: %s",
|
||||
"\n"
|
||||
),
|
||||
x$method_id,
|
||||
nrow(x$scores),
|
||||
paste(names(x$details), collapse = ", ")
|
||||
))
|
||||
cat(sprintf(
|
||||
paste0(
|
||||
"geposan result:",
|
||||
"\n Method: %s",
|
||||
"\n Number of genes: %i",
|
||||
"\n Available details: %s",
|
||||
"\n"
|
||||
),
|
||||
x$method_id,
|
||||
nrow(x$scores),
|
||||
paste(names(x$details), collapse = ", ")
|
||||
))
|
||||
|
||||
invisible(x)
|
||||
invisible(x)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue