RobinHankin / freegroup

The free group in R
https://robinhankin.github.io/freegroup/
0 stars 0 forks source link

bug in subs() #26

Closed stla closed 4 years ago

stla commented 4 years ago

Hello,

I think that subs() does not correctly work:

options(symbols = c("a","b","A","B"))
g <- inverse(alpha(1)) + alpha(2) # a^-1.b
subs(g, inverse(alpha(1)), alpha(3)) # should be A.b
# result: A^-1.b
RobinHankin commented 4 years ago

Hi there, thanks for this, not sure why I didn't see this comment until just now. Function subs() works on symbols, not semantic meaning which is why the idiom you post looks plausible but doesn't work as expected. I'll add some clarifying text to subs.Rd in a minute. Best wishes