make_products_explicit: Make implicit products explicit

Description Usage Arguments Examples

View source: R/implicit-product.R

Description

Make implicit products explicit

Usage

1
2
3
4
5
make_products_explicit(
  x,
  allowed_functions = getGroupMembers("Math"),
  allowed_constants = c("pi")
)

Arguments

x

user input

allowed_functions

functions (sequence of characters) that should not have products, e.g. cos, sin

Examples

1
2
3
4
5
6
7
8
make_products_explicit("2x")
make_products_explicit("2(1+2)")
make_products_explicit("x(y)")
make_products_explicit("(1+2)3") # Not allowed by definition
make_products_explicit("(1+2)x") # Is allowed
make_products_explicit("x(2+1) + sin(y)")
make_products_explicit("sin(2+1) + x(y+1)")
make_products_explicit("(2x)(y+1)")

r-cas/iomath documentation built on May 28, 2021, 11:10 p.m.