Hi all,
I have a mixed-type structured numpy array (including columns of ints,
floats and strings), sometimes with missing values. In rpy2-2.1, what is
the recommended (including fastest and least memory-expensive) way to
convert such a structure to an R dataframe? Here's where I've been:
1)
Howdy, I'd like to bring Python dates into rpy2 (and then into
ggplot2). How might this best be done? R evidently supports dates
natively.
What seems ideal is having a DateVector in the vein of FloatVector,
StrVector, and so on.
If I put a date in the format "datetime.date" into a Vector, python
John Owens yahoo.com> writes:
>
> Howdy, I'd like to bring Python dates into rpy2 (and then into
> ggplot2). How might this best be done? R evidently supports dates
> natively.
And as a hack, this seems to work OK for now for a 'rawdate' entry
in the dataframe where 'rawdates' is a python array
John Owens yahoo.com> writes:
> 'rawdate': ro.StrVector([d.isoformat() for d in rawdates]),
Eesh. This doesn't work. All dates are in 1970. Would thus
appreciate any guidance!
JDO
--
_
I haven't been able to work out how to map this syntax from R:
colours <- c(carni = "red", "NA" = "orange", insecti = "yellow",
herbi = "green", omni = "blue")
to rpy. (This example is from p. 107 in the ggplot2 book.)
Suggestions appreciated!
JDO