Displaying 1 result from an estimated 1 matches for "inline_identifier".
2013 Feb 17
1
tidy.source() gets confused when # is not a comment but a part of a literal string?
...ple if i copy the following to the clipboard
confuse.tidy <-
function()
{
txt <- 'abra # cadabra'
}
and run with default arguments
>tidy.source()
I am getting
Error in base::parse(text = text, srcfile = NULL) :
4:46: unexpected INCOMPLETE_STRING
4: txt <- 'abra %InLiNe_IdEnTiFiEr% "# cadabra'"
5: }
However, good news, as i realized after a bit of struggle, is that i could do
>tidy.source(keep.comment=F)
which produces desired
confuse.tidy <- function() {
txt <- "abra # cadabra"
}
Unfortunately, # is sometimes a legitimate part of...