Skip to content

Commit 2cbdfc5

Browse files
authored
fixed typos and column_exists
1 parent 501625e commit 2cbdfc5

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

R/omics-class.R

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,7 +1001,7 @@ omics <- R6::R6Class(
10011001
#--------------------------------------------------------------------#
10021002

10031003
if (!is.character(feature_rank) && length(feature_rank) != 1)
1004-
cli::cli_abort("{feature_rank} needs to be a character with a lenght of 1")
1004+
cli::cli_abort("{feature_rank} needs to be a character with a length of 1")
10051005

10061006
if (!is.character(condition.group) && length(condition.group) != 1) {
10071007
cli::cli_abort("{condition.group} needs to be a character with a length of 1")
@@ -1146,23 +1146,23 @@ omics <- R6::R6Class(
11461146
#--------------------------------------------------------------------#
11471147

11481148
if (!is.character(filename) && length(filename) != 1)
1149-
cli::cli_abort("{filename} needs to be a character with a lenght of 1")
1149+
cli::cli_abort("{filename} needs to be a character with a length of 1")
11501150

11511151
if (!is.character(feature_contrast) && length(feature_contrast) != 1) {
1152-
cli::cli_abort("{feature_contrast} needs to be a character with a lenght of 1")
1152+
cli::cli_abort("{feature_contrast} needs to be a character with a length of 1")
11531153
} else if (!column_exists(feature_contrast, self$featureData)) {
11541154
cli::cli_abort("{feature_contrast} does not exist in featureData!")
11551155
}
11561156

11571157
if (!is.null(beta_div_table) && !is.character(beta_div_table) && length(beta_div_table) != 1) {
1158-
cli::cli_abort("{beta_div_table} needs to be a character with a lenght of 1")
1158+
cli::cli_abort("{beta_div_table} needs to be a character with a length of 1")
11591159

11601160
if (file.exists(beta_div_table))
11611161
cli::cli_abort("{beta_div_table} already exists!")
11621162
}
11631163

11641164
if (!is.null(alpha_div_table) && !is.character(alpha_div_table) && length(alpha_div_table) != 1) {
1165-
cli::cli_abort("{alpha_div_table} needs to be a character with a lenght of 1")
1165+
cli::cli_abort("{alpha_div_table} needs to be a character with a length of 1")
11661166

11671167
if (file.exists(alpha_div_table))
11681168
cli::cli_abort("{alpha_div_table} already exists!")

R/utils.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ column_exists <- function(column, table) {
8484
any(!is.na(table[[col]]))
8585
}))
8686

87-
return ( length(valid_columns) == length(column) && columns_empty )
87+
return ( length(valid_columns) == length(column) && !columns_empty )
8888
}
8989

9090
is.wholenumber <- function(x, tol = .Machine$double.eps^0.5) {

0 commit comments

Comments
 (0)