Commit 56dde1e4 authored by Etienne Rifa's avatar Etienne Rifa
Browse files

compo fix output

parent 16493f7b
Pipeline #39268 passed with stage
in 12 seconds
......@@ -144,14 +144,12 @@ bars_fun <- function(data = data, rank = "Genus", top = 10, Ord1 = NULL, Fact1 =
}
}
# dir.create(outpath, recursive = TRUE)
# htmlwidgets::saveWidget(p1, glue::glue("{outpath}/{outfile}"))
if(!is.null(outfile)){
htmlwidgets::saveWidget(p1, outfile)
}
# facet_wrap output
if(!split) {
if(!is.null(outfile)){
htmlwidgets::saveWidget(p1, outfile)
}
return(p1)
} else {
p1 = meltdat %>% group_by(across({Ord1})) %>%
......@@ -170,6 +168,9 @@ bars_fun <- function(data = data, rank = "Genus", top = 10, Ord1 = NULL, Fact1 =
p1$x$layoutAttrs[[1]][[paste0("xaxis", i)]] = NULL
p1$x$layoutAttrs[[1]][[paste0("xaxis", i)]]$title <- glue("{Ord1} = {unique(meltdat[, Ord1])[i]}")
}
if(!is.null(outfile)){
htmlwidgets::saveWidget(p1, outfile)
}
return(p1)
}
}
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