Has anyone used the R plot function with the panel= option under rpy2?
I am stuck and need some assistance.
The R code would have this format (zz is a zoo series):
plot(zz, panel = my.panel, xaxt = "n", main="testing", xlab="Date")
my.panel <- function(...) {
fmt <- "%b-%d" # format for
How do I access the formatted month headers in an aggregated time series?
z1 is a zooreg time series that I want to aggregate by month:
ma = r.aggregate(z1, r['as.yearmon'], r.mean, **{'na.rm': True})
When I print the result vector, I get month/year information along with
the mean values:
>>>
I fixed the problem I was having importing R libraries while running
running rpy2 on an Apache server under mod_wsgi (Bottle).
Instead of
r.library("zoo")
I need to use
zoo=importr('zoo')
Bill
On 10/13/2011 1:00 PM, William T. Martin wrote:
> Has anyone s
Has anyone successfully run rpy2 on an Apache server using mod_wsgi?
I am using the rpy2 v.2.3.0 under Ubuntu. The base robjects work fine,
but the rpy2 program hangs up on the first r.library() statement.
Thank you
--
How do I specify na.rm=True to ignore NA vector values?
The following code:
import rpy2.robjects as ro
import rpy2.rinterface as ri
r=ro.r
data=ro.FloatVector([10, 20, 30])
print(data)
m=r.mean(data, na_rm=ri.TRUE)
print(m)
data_NA=ro.FloatVector([10, 20, 30, ro.NA_Real])
print(data_NA)
m_NA=r.
I have a string s="70 75 none 80" that I would like to convert to an
robjects.FloatVector f, which in R would be f<-(70, 75, NA, 80)
Under py2-2.0, this works for me:
>>> import rpy2.robjects as robjects
>>> readings="70 80 none 90"
>>> f=robjects.FloatVector(readings.split(" "))
>>> print(f)
I have a string s="70 75 none 80" that I would like to convert to an
robjects.FloatVector f, which in R would be f<-(70, 75, NA, 80)
Under py2-2.0, this works for me:
>>> import rpy2.robjects as robjects
>>> readings="70 80 none 90"
>>> f=robjects.FloatVector(readings.split(" "))
>>> print
I would like to do the rpy2 equivalent of the following:
(a <- rep(NA, 2000))
The rpy2 documentation says that missing values for NA_INTEGER,
NA_LOGICAL, and NA_REAL are broken.
Thank you
Bill
--
All the data c