Skip to contents

These functions handle representation management for a fftab object:

Usage

can_repr(x, repr)

get_repr(x)

set_repr(x, repr)

Arguments

x

A fftab object.

repr

For can_repr(), a character vector specifying representations ("polr", "rect", "cplx").

Value

  • can_repr(): Logical value (TRUE or FALSE) indicating if the object supports the specified representations.

  • get_repr(): A character vector of current representations.

  • set_repr(): A modified fftab object with the specified representation(s).

Details

  • get_repr(): Retrieve current representations.

  • can_repr(): Check if the object supports specific representations.

  • set_repr(): Convert the object to one or more specified representations.

See also

Examples

fftab(c(1, 0, -1, 0)) |> can_repr("cplx")
#> [1] TRUE

fftab(c(1, 0, -1, 0)) |> get_repr()
#> [1] "cplx"

fftab(c(1, 0, -1, 0)) |> set_repr(c("polr", "rect"))
#> # A tibble: 4 × 5
#>   .dim_1   mod   arg    re    im
#>    <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1   0        0     0     0     0
#> 2   0.25     2     0     2     0
#> 3   0.5      0     0     0     0
#> 4  -0.25     2     0     2     0