Skip to content

Commit e550057

Browse files
committed
improve printing method for small tables
1 parent 5705089 commit e550057

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

inst/shiny/global.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,8 @@ attr.info <- function(df, colname, numattrs, breaks) {
155155
tab <- hist(df[[colname]], breaks = breaks, plot = FALSE)
156156
barname <- paste(tab$breaks[1:2], collapse = "-")
157157
for(i in seq(length(tab$breaks) - 2)){
158-
barname <- append(barname, paste(tab$breaks[i+1]+1, tab$breaks[i+2], sep = "-"))
158+
barname <- append(barname, paste(tab$breaks[i+1]+1,
159+
tab$breaks[i+2], sep = "-"))
159160
}
160161
tab <- tab$counts
161162
names(tab) <- barname

inst/shiny/server.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1462,7 +1462,10 @@ output$attrtbl_sm <- renderPrint({
14621462
tbl_list[[a]] <- tab
14631463
}
14641464
}
1465-
tbl_list
1465+
for(a in attrname){
1466+
print(a, quote = FALSE)
1467+
print(tbl_list[[a]])
1468+
}
14661469
})
14671470

14681471
output$attrhist <- renderPlot({

0 commit comments

Comments
 (0)