Skip to content
Prev 75684 / 398502 Next

as.character and a formula

Gavin Simpson <gavin.simpson at ucl.ac.uk> writes:
Yes.
What extra "+" ? There are three of them in fmla[[3]] and three in
as.character(....).

as.character of an object of mode call is obtained by converting it to
a list and deparsing each term (modulo some details regarding
backquotes). This is somewhat peculiar, but quite a bit of legacy code
is depending on it. Things like testing for as.character(e)[1] == "~"