Skip to content

Solves #338 - assertions for safe_t_test#352

Merged
munoztd0 merged 2 commits into
devfrom
338_Add-assertions-safe_t_test
May 28, 2026
Merged

Solves #338 - assertions for safe_t_test#352
munoztd0 merged 2 commits into
devfrom
338_Add-assertions-safe_t_test

Conversation

@wwojciech
Copy link
Copy Markdown
Collaborator

Fixes #338

Checks

  • (Have you updated the NEWS.md ?)
  • (Have you added proper tests for new functions/features ?)
  • (Have you added new functions to the pkgdown.yml ?)
  • (Have you run document() on new functions ?)

@wwojciech wwojciech requested a review from munoztd0 May 27, 2026 21:42
@wwojciech wwojciech self-assigned this May 27, 2026
@wwojciech wwojciech added the documentation Improvements or additions to documentation label May 27, 2026
@wwojciech wwojciech linked an issue May 27, 2026 that may be closed by this pull request
@munoztd0
Copy link
Copy Markdown
Collaborator

Looks good to me, but why removing the NA logic and tests, did you talk with @iaugusty about it ?

@wwojciech
Copy link
Copy Markdown
Collaborator Author

Looks good to me, but why removing the NA logic and tests, did you talk with @iaugusty about it ?

@munoztd0 - You mean the assertions against NA in x and y? That is because: (1) computations on NAs do not make sense; and (2) the safe_t_test() computations should be safe, i.e. they should not silently remove any NAs.

I did not explicitly talk to Ilse about it, but if you look at the code where safe_t_test() is used by Ilse, the NAs are already removed. See here:

x1 <- x1[!is.na(x1)]
x2 <- x2[!is.na(x2)]
ttest_stat <- safe_t_test(x1, x2, conf.level = control$conf_level)

@munoztd0 munoztd0 merged commit 09833bf into dev May 28, 2026
@munoztd0 munoztd0 deleted the 338_Add-assertions-safe_t_test branch May 28, 2026 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add assertions for safe_t_test().

2 participants