Hello,

I've encoured some difficulty with using RPy to generate a plot
showing the results of a linear regression. My code is as follows:

        r = robjects.r
        xVec = robjects.FloatVector(X)
        yVec = robjects.FloatVector(Y)
        robjects.globalEnv["xVec"] = xVec
        robjects.globalEnv["yVec"] = yVec
        reg = r.lm("xVec ~ yVec")
        
        print(r.summary(reg))
        r.plot(xVec, yVec, xlab="Northing", ylab="Normalized Unique Sequences")
        r.abline(reg, lty=1)

This all works except the last line. My resulting plot shows my data
points, but not the regression line. Has anyone encountered this
problem before? Thanks for any and all help. I'm new to RPy\R so
perhaps am missing something simple here.

Cheers,
Donovan


PS: Thanks for your help Laurent on accessing the adj. r-squared value.

------------------------------------------------------------------------------
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to