Commit 93d4429b authored by Jakob Wirbel's avatar Jakob Wirbel
Browse files

give out useful error messages if tibbles are supplied to the siamcat class constructor.

parent 4fdbf7da
......@@ -274,6 +274,10 @@ validate.features <- function(feat){
feat <- otu_table(feat, taxa_are_rows=TRUE)
} else if ({
if (is(feat, 'tbl')){
stop(paste0("Tibbles are not supported. Features need to be a",
" numeric matrix or data.frame with rownames!"))
# or a dataframe (then do the same as above)
if (any(!is.numeric(unlist(feat)))){
stop(paste0('SIAMCAT expects numerical features!.\n',
......@@ -325,6 +329,10 @@ validate.metadata <- function(meta){
if ({
if (is(meta, 'tbl')){
stop(paste0("Tibbles are not supported. Metadata needs to be",
" a dataframe with rownames!"))
meta <- sample_data(meta)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment