Re: [Rpy] python dates -> rpy dates -> ggplot2 dates, how to?

2010-04-24 Thread Laurent
Date vectors in R can be handled in several ways. Check the documentation and the R lists. Having a DateVector is an interesting idea. It could possibly make working with dates vectors easier from rpy2 than from R. On 23/04/10 21:18, John Owens wrote: > Howdy, I'd like to bring Python dates i

Re: [Rpy] conversion of R's c(a=b, i=j, x=y) syntax to rpy

2010-04-24 Thread Laurent
One possible way: x = (('carni', 'red'), ('na', 'orange')) r = ro.StrVector([elt[1] for elt in x]) r.names = ro.StrVector([elt[0] for elt in x]) L. On 24/04/10 03:46, John Owens wrote: > I haven't been able to work out how to map this syntax from R: > > colours<- c(carni = "red", "NA" = "orange",

Re: [Rpy] python dates -> rpy dates -> ggplot2 dates, how to?

2010-04-24 Thread John Owens
I'm less concerned with figuring out how to handle them in R than figuring out how to get them into R via rpy2. DateVector would be a nice way to handle this; how would you recommend doing it? What I thought I might try is sending it in ISO format using datetime's isoformat() operator, encapsulati