Skip to content

Commit

Permalink
Fix to sotkanet_interactive
Browse files Browse the repository at this point in the history
  • Loading branch information
Allaht2 committed Jul 5, 2024
1 parent a009472 commit bbdaf9f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions R/sotkanet_interactive.R
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,15 @@ sotkanet_interactive <- function(code = NULL){
}

if (exists("sotkanet_data")){
print_code <- switch(
print_fixity <- switch(
menu(choices = c("Yes", "No"),
title = "Print dataset fixity checksum?") + 1,
return(invisible()),
TRUE,
FALSE
)

if (print_code){
if (print_fixity){
fixity <- sotkanet_fixity(sotkanet_data, algorithm = "md5")
capture.output(cat("#### FIXITY CHECKSUM: \n\n"),
file = tempfile_for_sink, append = TRUE)
Expand All @@ -189,7 +189,9 @@ sotkanet_interactive <- function(code = NULL){
}

if (exists("sotkanet_data")){
cat(readLines(tempfile_for_sink), sep = "\n")
if (print_code || print_citation || print_fixity) {
cat(readLines(tempfile_for_sink), sep = "\n")
}
return(sotkanet_data)
}

Expand Down

0 comments on commit bbdaf9f

Please sign in to comment.