Current function name | Previous function name |
---|---|
autocorr | autocorrSC |
corrected_tau | corrected_tauSC |
describe [since v0.52] | describeSC |
fill_missing | fillmissingSC |
outlier | outlierSC |
overlap | overlapSC |
power_test | power_testSC |
rand_test | randSC; rand.test |
ranks | rankSC |
rci | rCi; rciSC |
shift | shiftSC |
smooth_cases | smoothSC |
style_plot | style.plotSC; style_plotSC |
tau_u | tauUSC |
trend | trendSC |
truncate_phase | truncateSC |
Appendix B — Changes
B.1 Important changes with version 0.53
B.1.1 Single-case studies with cases of varying phase design
Sometimes it is necessary to combine single-cases with different phase-designs into one single-case study (for instance when some cases include an extension phase and others do not). Various functions in scan now can handle such a data structure.
B.1.2 Piping
The concept of piping is great for writing clean and intelligible code that is easier to debug. We imported the pipe function %>%
from the magrittr
package. Since version 4.1, R has its own pipe operator implementation |>
. This is great and works fine with the scan
package. But since the |>
Operator is not backwards compatible for R prior versions 4.1, we will stick with the %>%
for a while.
To allow for smooth “piping” we began adding some functions select_phases
, subset
, select_cases
, set_var
, set_dvar
, set_mvar
, set_pvar
, and add_l2
.
B.2 Important changes with version 0.50
B.2.1 New function names
With version 0.50 scan introduced new names for its functions. The old function names are still usable but they will return a “deprecated” warning telling you to use the new function names.
(rtbl-aliases?) shows the changes.
B.2.2 Change target variables in functions
All functions in R that analyze data now allow for temporarily changing dependent, phase, and measurement-time variables by adding three argument:
dvar
sets the dependent variable.
pvar
sets the phase variable.
mvar
sets the measurement-time variable.
For example, overlap(exampleAB_add, dvar = "depression")
will report overlap parameters for the variable depression while overlap(exampleAB_add)
while take wellbeing as the dependent variable (as defined in the scdf).
After finishing the analysis, the variables are set back to their original values as defined in the scdf.