-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
103 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# unit classes are working | ||
|
||
Code | ||
octants() | ||
Output | ||
90 135 180 225 270 315 360 45 | ||
Degrees | ||
|
||
--- | ||
|
||
Code | ||
as_radian(octants()) | ||
Output | ||
1.571 2.356 3.142 3.927 4.712 5.498 6.283 0.785 | ||
Radians | ||
|
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# ssm_table is correct | ||
|
||
Code | ||
ssm_table(res, render = FALSE) | ||
Output | ||
Profile Elevation X.Value Y.Value | ||
1 All 0.92 (0.89, 0.95) 0.35 (0.32, 0.38) -0.25 (-0.28, -0.22) | ||
Amplitude Displacement Fit | ||
1 0.43 (0.40, 0.46) 324.3 (320.9, 328.0) 0.878 | ||
|
||
--- | ||
|
||
Code | ||
ssm_table(res, drop_xy = TRUE, render = FALSE) | ||
Output | ||
Profile Elevation Amplitude Displacement Fit | ||
1 All 0.92 (0.89, 0.95) 0.43 (0.40, 0.46) 324.3 (320.9, 328.0) 0.878 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
test_that("SSM Table captions are correct", { | ||
data("jz2017") | ||
res <- ssm_analyze(jz2017, scales = 2:9) | ||
expect_equal( | ||
dcaption(res), | ||
"Mean-based Structural Summary Statistics with 95% CIs" | ||
) | ||
|
||
res <- ssm_analyze( | ||
jz2017, | ||
scales = 2:9, | ||
grouping = "Gender", | ||
contrast = TRUE | ||
) | ||
expect_equal( | ||
dcaption(res), | ||
"Mean-based Structural Summary Statistic Contrasts with 95% CIs" | ||
) | ||
|
||
res <- ssm_analyze( | ||
jz2017, | ||
scales = 2:9, | ||
measures = "PARPD" | ||
) | ||
expect_equal( | ||
dcaption(res), | ||
"Correlation-based Structural Summary Statistics with 95% CIs" | ||
) | ||
|
||
res <- ssm_analyze( | ||
jz2017, | ||
scales = 2:9, | ||
measures = "PARPD", | ||
grouping = "Gender", | ||
contrast = TRUE | ||
) | ||
expect_equal( | ||
dcaption(res), | ||
"Correlation-based Structural Summary Statistic Contrasts with 95% CIs" | ||
) | ||
}) | ||
|
||
|
||
test_that("ssm_table is correct", { | ||
data("jz2017") | ||
res <- ssm_analyze(jz2017, scales = 2:9) | ||
expect_snapshot(ssm_table(res, render = FALSE)) | ||
expect_snapshot(ssm_table(res, drop_xy = TRUE, render = FALSE)) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters