mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2026-06-21 05:19:07 +02:00
minor adjustments
This commit is contained in:
parent
a5e26354de
commit
65327a4879
8 changed files with 69 additions and 27 deletions
|
|
@ -71,7 +71,11 @@ add_sparkline <- function(grid, column = "vals", color.main = "#2a8484", color.s
|
|||
column = column,
|
||||
renderer = function(data) {
|
||||
data_cl <- class(data)
|
||||
if (identical(data_cl, "factor")) {
|
||||
if (all(sapply(data,is.na))){
|
||||
type <- "line"
|
||||
ds <- data.frame(x = NA, y = NA)
|
||||
horizontal <- FALSE
|
||||
} else if (identical(data_cl, "factor")) {
|
||||
type <- "column"
|
||||
s <- summary(data)
|
||||
ds <- data.frame(x = names(s), y = s)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue