On Wed, Sep 1, 2010 at 4:22 PM, Ricardo Rodríguez <ricardorodo...@gmail.com> wrote: > hi, again using Rpy and Rpy2, this error is due, > > Error in .Call("R_isMethodsDispatchOn", onOff, PACKAGE = "base") : > Incorrect number of arguments (2), expecting 1 for R_isMethodsDispatchOn > Error in function (x, pos = -1, envir = as.environment(pos), mode = "any", > : > object 'help' not found > > just try in my code: > > import os,time,string,sys,shutil > import rpy2.robjects as robjects > from rpy import * > > r(""" > library(rgdal) > library(gstat) > readOGR(dns=/usr/local/grass-6.5.svn/, layer=centralidad, verbose = FALSE, > p4s=NULL, drop_unsupported_fields=FALSE, > input_field_name_encoding=NULL, pointDropZ=FALSE) > gradocentralidadR <- idw.spatial(grado ~ 1, centralidad, idp = 2.0) > closennessR <- idw.spatial(closen ~ 1, centralidad, idp = 2.0) > betweennessR <- idw.spatial(between ~ 1, centralidad, idp = 2.0) > eigenvectorsR <- idw.spatial(eigen ~ 1, centralidad, idp = 2.0) > writeGDAL(gradocentralidadR,"/tmp/gradocentralidad.tiff",type="Float32",driver="GTiff") > writeGDAL(closennessR,"/tmp/closenness.tiff",type="Float32",driver="GTiff") > writeGDAL(betweennessR,"/tmp/betweenness.tiff",type="Float32",driver="GTiff") > writeGDAL(eigenvectorsR,"/tmp/eigenvectors.tiff",type="Float32",driver="GTiff") > """) >
I wouldn't try and use both rpy and rpy2 in the same script. Also you don't seem to be using the os, time, string, sys, and shutil modules anywhere. The most important question is does that embedded R script work in R? Also check the newlines (which have probably been messed up by pasting into the email). Perhaps a few semi-colons in your R code would help here to make the end of each statement explicit? Peter ------------------------------------------------------------------------------ This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd _______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list