Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8459309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:18:00+00:00 2026-06-10T13:18:00+00:00

I am using the R function autokrige from automap package, but I got an

  • 0

I am using the R function autokrige from automap package, but I got an error and I do not know how to solve it. Do you have any hints?

Thank you!

sp.poidf <- SpatialPointsDataFrame(sp.poi,thresh.df)
proj4string(sp.poidf) <- CRS("+proj=longlat +datum=WGS84")
pro.df=spTransform(sp.poidf, CRS("+proj=merc +zone=32s +datum=WGS84"))
sp.new <- SpatialPoints(new.poi)
proj4string(sp.new) <- CRS("+proj=longlat +datum=WGS84")
pro.new <- spTransform(sp.new, CRS("+proj=merc +zone=32s +datum=WGS84"))
mykri <- autoKrige(mythresh~1,pro.df,newdata=pro.new)

Error in function (classes, fdef, mtable)  : 
unable to find an inherited method for function "proj4string", for signature "NULL"
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T13:18:01+00:00Added an answer on June 10, 2026 at 1:18 pm

    The following code reproduces your problem:

    require(automap)
    require(rgdal)
    loadMeuse()
    
    proj4string(meuse) = CRS("+init=epsg:28992")
    proj4string(meuse.grid) = CRS("+init=epsg:28992")
    meuse = spTransform(meuse, CRS("+proj=merc +zone=32s +datum=WGS84"))
    # Note that meuse.grid no longer is a grid due to the reprojection
    meuse.grid = spTransform(meuse.grid, CRS("+proj=merc +zone=32s +datum=WGS84"))
    
    kr = autoKrige(zinc~1, meuse, newdata = meuse.grid)
    Error in function (classes, fdef, mtable)  : 
      unable to find an inherited method for function "proj4string", for signature "NULL"
    

    The problem is that you use newdata =, while you should be using new_data = (note the underscore). The following code runs fine:

    kr = autoKrige(zinc~1, meuse, new_data = meuse.grid)
    

    The documentation of autoKrige shows this, but krige (from gstat) uses newdata, so I understand the confusion.

    What goes wrong is that newdata = is not recognized by autoKrige, and put in the ... part of the argument list. When autoKrige calls krige there is a conflict between new_data supplied by autoKrige, and newdata supplied via .... To prevent other users from ending up with the rather vague error message, I added a check to automap. The erroneous code now leads to an exception:

    > kr = autoKrige(zinc~1, meuse, newdata = meuse.grid)
    Error in autoKrige(zinc ~ 1, meuse, newdata = meuse.grid) : 
      The argument name for the prediction object is not 'newdata', but 'new_data'.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a simple C class I have implemented, using function pointers in a
I have a question regarding use of FFT. Using function getBand(int i) with Minim
using getdate function assign today to the today.but why today year assign to year.its
I'm using DiInstallDevice function ( MSDN ) for driver installing. However, I've got a
I have this quick question regarding cost estimation using Function Points. We are doing
Question is about sorting std::vector<myclass> using function sort from STL's algorithms class. Standard way
I am using function random()%x for the generation of a random number, but every
Trying hard to replace the eval without using Function constructor. Stumped. I am not
I have problems with php multilanguage. I'm using function *check_lang* and it works fine
I'm using function to detect my website visitors browser type but later i found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.