Hi,
I was trying get the rpy to work but was stuck. Would you help us with
these simple rpy commands?
I did the following:
python
from rpy import r
x = r.matrix(r.rnorm(100), 50, 2)
r.kmeans(x, 2)
The error was:
Traceback (most recent call last):
File "", line 1, in ?
rpy.RException: Erro
The basic problem is that by default, RPy converts objects returned
to python to a python object. Unfortunately, this conversion loses
some information, including the type of the original R object.
To avoid this conversion add two lines to your code:
On Feb 22, 2008, at 12:36PM , marco hof
On Fri, Feb 22, 2008 at 12:36 PM, marco hofmann <[EMAIL PROTECTED]> wrote:
> Hi all,
> I have a problem with the predict command. Here is an example:
>
> from rpy import *
> r.library("nnet")
> model = r("Fxy~x+y")
>
> df = r.data_frame(x = r.c(0,2,5,10,15)
>,y = r.c(0,2,5,
Hi all,
I have a problem with the predict command. Here is an example:
from rpy import *
r.library("nnet")
model = r("Fxy~x+y")
df = r.data_frame(x = r.c(0,2,5,10,15)
,y = r.c(0,2,5,8,10)
,Fxy = r.c(0,2,5,8,10))
NNModel = r.nnet(model, data = df