Skip to content

Commit

Permalink
add ssm_plot_curve
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgirard committed Oct 27, 2024
1 parent 8c08945 commit 9ba2b90
Show file tree
Hide file tree
Showing 9 changed files with 279 additions and 89 deletions.
3 changes: 3 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ S3method(as_degree,default)
S3method(as_radian,circumplex_degree)
S3method(as_radian,circumplex_radian)
S3method(as_radian,default)
S3method(print,circumplex_degree)
S3method(print,circumplex_instrument)
S3method(print,circumplex_radian)
S3method(print,circumplex_ssm)
S3method(quantile,circumplex_radian)
S3method(summary,circumplex_instrument)
Expand All @@ -30,6 +32,7 @@ export(ssm_analyze)
export(ssm_parameters)
export(ssm_plot_circle)
export(ssm_plot_contrast)
export(ssm_plot_curve)
export(ssm_plot_scores)
export(ssm_score)
export(ssm_table)
Expand Down
14 changes: 14 additions & 0 deletions R/ssm_oop.R
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,20 @@ as_radian.circumplex_degree <- function(x, ...) {
new_radian(x * (pi / 180))
}

# S3 Method
#' @method print circumplex_degree
#' @export
print.circumplex_degree <- function(x, digits = 3, ...) {
cat(round(x, digits = digits), "\nDegrees\n")
}

# S3 Method
#' @method print circumplex_radian
#' @export
print.circumplex_radian <- function(x, digits = 3, ...) {
cat(round(x, digits = digits), "\nRadians\n")
}

# Class ssm --------------------------------------------------------------------

# S3 Constructor
Expand Down
Loading

0 comments on commit 9ba2b90

Please sign in to comment.