4

I am proficient in Python, but have no knowledge of R. Can you suggest a good tutorial in using rpy2 or any other R library to perform Block/Cokriging "Kriging"

2

I think if your are proficient in Python, you can manage the rpy2 part (there are examples here), but you need more a book on spatial statistics in R. That would probably be Applied Spatial Data Analysis with R. Section 8.5 is about spatial predictions. The book is available online through library subscription, but the code from the chapter is freely available (have a look at chunk 15 and following). gstat's vignette also provide step by step tutorial.

While I don't work with rpy2 a lot, I generally find it easier to work the R code in R, and once it's OK, run it through python.

  • The example provided is for rpy, not rpy2. – lgautier Nov 1 '12 at 6:19
  • Hi! Etiennebr, thanks for suggesting a good book for geostatistics with R. I was just wondering about "to work the R code in R, and once it's OK, run it through python." How is the R code run in Python? – user1142937 Nov 7 '12 at 10:52
  • That's where rpy2 comes in. Have a look at the rpy2 documentation. It's a module you load in python that allows you to interact with R from python. – Etienne Racine Nov 9 '12 at 20:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.