Skip to content

Quiet readasap3 dat file#1

Open
mle2718 wants to merge 3 commits intocmlegault:masterfrom
mle2718:quiet_READASAP3DatFile
Open

Quiet readasap3 dat file#1
mle2718 wants to merge 3 commits intocmlegault:masterfrom
mle2718:quiet_READASAP3DatFile

Conversation

@mle2718
Copy link

@mle2718 mle2718 commented Apr 28, 2023

@cmlegault : I've added an optional "quiet" argument to ReadASAP3DatFile that is passed to scan()

default=FALSE, so fully backwards compatible.
quiet=TRUE suppresses printing of results of scan()

This might only be useful to me...I'm reading in .dat files as part of a loop and using the console output occasionally to debug. Without "quiet", it's hard to figure out how far along in the loop I am.

# testing script
file_in<-file.path("your","path", "to", "examples", "simplelogistic.dat")
dat_file_OG <- ReadASAP3DatFile(file_in)
dat_file_noisy <- ReadASAP3DatFile(file_in, quiet=FALSE) 
dat_file_quiet <- ReadASAP3DatFile(file_in, quiet=TRUE) 

all.equal(dat_file_OG, dat_file_noisy)
all.equal(dat_file_OG, dat_file_quiet)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant