Skip to content

Commit

Permalink
Handle case of empty table
Browse files Browse the repository at this point in the history
  • Loading branch information
Admin_asena5 authored and Admin_asena5 committed Apr 2, 2024
1 parent 2f920e8 commit 6d7316c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion R/Database.R
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,11 @@ exportDatabaseToCsv <- function(

inds <- floor(countN/maxRowCount)
tableAppend = F
pb = utils::txtProgressBar(min = 0, max = countN, initial = 0)
# NOTE: If the table has 0 rows (countN == 0),
# then setting the txtProgressBar will fail since
# min < max. So, setting max = countN+1 for this
# reason.
pb = utils::txtProgressBar(min = 0, max = countN+1, initial = 0)

for(i in 1:length(inds)){

Expand Down

0 comments on commit 6d7316c

Please sign in to comment.