Re: [R] History pruning

From: Ken Williams <>
Date: Thu, 31 Jul 2008 13:08:17 -0500

On 7/31/08 11:01 AM, "hadley wickham" <> wrote:

> I think that would be a very hard task -

Well, at least medium-hard. But I think significant automatic steps could be made, and then a human can take over for the last few steps. That's why I was enquiring about "tools" rather than a complete solution.

Does R provide facilities for introspection or interrogation of expression objects? I couldn't find anything useful on first look:

> methods(class="expression")

no methods were found
> dput(expression(foo <- 5 * bar))

expression(foo <- 5 * bar)
> str(expression(foo <- 5 * bar))

  expression(foo <- 5 * bar)  

> it's equivalent to taking a
> long rambling conversation and then automatically turning it into a
> concise summary of what was said. I think you must have human
> intervention.

It's not really equivalent, natural language has ambiguities and subtleties that computer languages, especially functional languages, intentionally don't have. By their nature, computer languages can be turned into parse trees unambiguously and then those trees can be manipulated.

But coincidentally I work in a Natural Language Processing group, and one of the things we do is create exactly the kind of concise summaries you describe. =)

Ken Williams
Research Scientist
The Thomson Reuters Corporation
Eagan, MN

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Thu 31 Jul 2008 - 19:05:09 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 31 Jul 2008 - 21:33:14 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive