Skip to content

Add a timestamp to write_summary_table#563

Merged
hallareinert merged 3 commits into
osparcomm:developfrom
RobFryer:summary_timestamp
Jul 3, 2026
Merged

Add a timestamp to write_summary_table#563
hallareinert merged 3 commits into
osparcomm:developfrom
RobFryer:summary_timestamp

Conversation

@RobFryer

Copy link
Copy Markdown
Contributor

resolves #562

write_summary_table now produces a timestamp (as the first column of the summary table) if argument timestamp is set to TRUE. The default is not to produce a timestamp.

Tested on AMAP external data example

Comment thread R/reporting_functions.R Outdated

# create timestamp if timestamp = TRUE

if (timestamp) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it not need to say if (timestamp == TRUE)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. It looks like the most robust thing is to use isTRUE(timestamp).
isTRUE(x) is the same as is.logical(x) && length(x) == 1 && !is.na(x) && x, so tests whether x is a logical and of length 1 and isn't missing and is TRUE
Will change and resubmit

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't know about isTRUE(x), I like it!

@hallareinert hallareinert left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On line 547, does it not need to say "if (timestamp == TRUE)"?

@RobFryer

RobFryer commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

@hallareinert
That should be it sorted. If you have the chance, please can you check and merge today. If not, I'll merge tomorrow so I can get the release released

@hallareinert hallareinert merged commit e3ae94d into osparcomm:develop Jul 3, 2026
1 check passed
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.

add timestamp to summary table

2 participants