Skip to content

Compute sine

Source code

Description

Compute sine

Usage

<Expr>$sin()

Value

Expr

Examples

library(polars)

pl$DataFrame(a = c(0, pi / 2, pi, NA_real_))$
  with_columns(sine = pl$col("a")$sin())
#> shape: (4, 2)
#> ┌──────────┬────────────┐
#> │ a        ┆ sine       │
#> │ ---      ┆ ---        │
#> │ f64      ┆ f64        │
#> ╞══════════╪════════════╡
#> │ 0.0      ┆ 0.0        │
#> │ 1.570796 ┆ 1.0        │
#> │ 3.141593 ┆ 1.2246e-16 │
#> │ null     ┆ null       │
#> └──────────┴────────────┘