Re: [R] Retrieving x argument name from a trellis object

2009-08-14 Thread vincenzo . 2 . di-iorio
Dear Deepayan, First of all I'm sorry for resuming such an old thread, but I think I may have found an easy fix. Replacing in xyplot.formula (and similar internal functions for the other Trellis plots) foo$call - sys.call(sys.parent()) foo$call[[1]] - quote(xyplot) with foo$call

Re: [R] Retrieving x argument name from a trellis object

2009-08-14 Thread vincenzo . 2 . di-iorio
Dear Deepayan, I see your point. I must admit that I was considering only formula's as x argument for the trellis plots. What I would really like to have in your example, would be barchart.matrix - function (x, data = NULL, ...) { foo - barchart(as.table(x), data, ...) foo$call -

Re: [R] Retrieving x argument name from a trellis object in R 2.8.0

2008-11-13 Thread vincenzo . 2 . di-iorio
Deepayan Sarkar [EMAIL PROTECTED] wrote on 13/11/2008 02:23:25: I will try to track down the reason for the odd results that we currently get if I have time, but it's not going to be a priority. -Deepayan In any case, thanks. Vincenzo

Re: [R] Retrieving x argument name from a trellis object in R 2.8.0

2008-11-12 Thread vincenzo . 2 . di-iorio
Dear Deepayan, thanks for you quick response. The main idea is to use trellis_object$call$x as a label in a tcltk interface to choose one among several plots and perform a given task (e.g. print on screen, export as pdf etc.). I've a script that works just fine in R 2.4.1 for instance, but

[R] Retrieving x argument name from a trellis object in R 2.8.0

2008-11-11 Thread vincenzo . 2 . di-iorio
Dear all, let consider the following function: Fun1 - function() { library(lattice) plot1 - 1:10~1:10 pl1 - xyplot(plot1) return(pl1$call$x) } In R 2.5.0 (or older version) we have Fun1() plot1 but starting from R 2.5.1 until the latest R 2.8.0 we obtain instead Fun1() NULL

Re: [R] regex sulotion for seperating number and string

2008-03-05 Thread vincenzo . 2 . di-iorio
Hi Sun, vec - c(2324gz,2567 HK,3741,BF) vec1 - gsub('[^[:digit:]]','',vec) vec2 - gsub('[^[:alpha:]]','',vec) vec1 [1] 2324 2567 3741 vec2 [1] gz HK BF Cheers Vincenzo --- Vincenzo Luca Di Iorio Consultant