Hi, On Monday 06 September 2010, Prasenjit Kapat wrote: > Can we get the last command from history?
in theory, yes, but not currently. (We do not support the R history mechanisms, yet, but it's in the feature tracker somewhere). > Remember we are only interested in the primary plotting functions. > Unfortunately, utils::history () calls file.show () in the end, so I > don't think the paged output can be assigned to any variable. I was > thinking of writing another history function (almost the same as > utils::history) which would search for plot ()-type patterns, eg: > "^(plot|hist|boxplot|...)". This function would be called from our > wrapped plot.new () just before record () call. A properly crafted > regex pattern, can hunt down the first line of a multiline command as > well. Note that the plot-call may not be in the history at all. The user may well have used a hand-written function (or one form some obscure package) that created the plot. And in fact a single top-level command may produce several totally different plots. An alternative could be to inspect sys.calls() inside plot.new(). Although it may not always be clear, just which call best describes the plot. Also of course, there's the problem that not all plots are created with plot.new(), again. Still I would think this will probably be a more reliable method. > Again, this is just an idea. What do yo think? Will it work? Well, I'm not opposed against experimenting with this. But also, personally, I'm pretty happy with the current title-extraction, so I'd give this very low priority. Definitely not something to worry about before everything else working. Regards Thomas
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------------ This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________ RKWard-devel mailing list RKWard-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rkward-devel