freegroup (version 1.1-0)

char_to_free: Convert character vectors to free objects

Description

Convert character vectors to free objects

Usage

char_to_matrix(x)

Arguments

x

A character vector

Details

Function char_to_matrix() gives very basic conversion between character vectors and free objects. Current functionality is limited to strings like “aaabaacd”, which would give \(a^3ba^2cd\). It would be nice to take a string like “a^3b^(-3)” but this is not yet implemented.

Function char_to_free() is a vectorized version that coerces output to free.

See Also

print.free

Examples

Run this code
# NOT RUN {
char_to_matrix("aaabacdcd")

rfree(10,3) + as.free('xxxxxxxxxxxx')

as.free(letters)*7

as.free('')  # identity element



# }

Run the code above in your browser using DataCamp Workspace