Error in bbox(newdata) : object not a >= 2-column array

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Error in bbox(newdata) : object not a >= 2-column array

Philipova
Dear R-Users,
Please anyone to help me with this error:

kriged=krige(Nmin~1,locationsDD,grid,model=vgm(1,"Exp",150,1))
Error in bbox(newdata) : object not a >= 2-column array

Thank you so much in advance!
Kind Regards
Nina Philipova
_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

variogram2.txt (2K) Download Attachment
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error in bbox(newdata) : object not a >= 2-column array

Barry Rowlingson
On Sat, Mar 11, 2017 at 12:38 PM,  <[hidden email]> wrote:
> Dear R-Users,
> Please anyone to help me with this error:
>
> kriged=krige(Nmin~1,locationsDD,grid,model=vgm(1,"Exp",150,1))
> Error in bbox(newdata) : object not a >= 2-column array
>
> Thank you so much in advance!

 Hard to debug without your data. The error message is telling us that
something is wrong with your input, but we can't see your data....

 If you can't share your data, at least share what you get from
summary(grid) and summary(locationsDD).

 You should also confirm what package `krige` is coming from - I
assume its gstat.

If you can get back to the mailing list with this information, we
might be able to help, otherwise we're guessing!

Barry

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error in bbox(newdata) : object not a >= 2-column array

Warner, David
In reply to this post by Philipova
I was getting this error as well.  The cause was either not having the
coordinates and coordinate reference system (CRS) set or having the wrong
CRS.  I did both at the same time so I am not sure which it was.

Is your 'grid' a SpatialPixels object?

Did you run a line like 'coordinates(grid) <- ~x + y'  ?

If so, did you then set the CRS?



On Sat, Mar 11, 2017 at 7:38 AM, <[hidden email]> wrote:

> Dear R-Users,
> Please anyone to help me with this error:
>
> kriged=krige(Nmin~1,locationsDD,grid,model=vgm(1,"Exp",150,1))
> Error in bbox(newdata) : object not a >= 2-column array
>
> Thank you so much in advance!
> Kind Regards
> Nina Philipova
> _______________________________________________
> R-sig-Geo mailing list
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>



--
David Warner
Research Fisheries Biologist
U.S.G.S. Great Lakes Science Center
1451 Green Road
Ann Arbor, MI 48105
734-214-9392

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error in bbox(newdata) : object not a >= 2-column array

Philipova
> Dear David,
Dear R users,
Now R calculates var1.pred as a constatnt:
kriged=krige(Nmin~1,locationsDD,grid,model=fit)

> kriged["var1.pred"]


925  (339003.4, 2988160)  11.22117
926  (339013.4, 2988160)  11.22117
927  (339023.4, 2988160)  11.22117
928  (339033.4, 2988160)  11.22117
929  (339043.4, 2988160)  11.22117
930  (339053.4, 2988160)  11.22117
931  (339063.4, 2988160)  11.22117
932  (339073.4, 2988160)  11.22117
933  (339083.4, 2988160)  11.22117
........................................
7482 (339293.4, 2989180)  11.22117
7483 (339303.4, 2989180)  11.22117
7484 (339313.4, 2989180)  11.22117
7485 (339323.4, 2989180)  11.22117
7486 (339333.4, 2989180)  11.22117
7487 (339343.4, 2989180)  11.22117
7488 (339353.4, 2989180)  11.22117
>
spplot(kriged["var1.pred"])
 Error: unexpected string constant in:
"
spplot(kriged[""

And it cann't give ssplot
Please if anyone can help me!


I was getting this error as well.  The cause was either not having the

> coordinates and coordinate reference system (CRS) set or having the wrong
> CRS.  I did both at the same time so I am not sure which it was.
>
> Is your 'grid' a SpatialPixels object?
>
> Did you run a line like 'coordinates(grid) <- ~x + y'  ?
>
> If so, did you then set the CRS?
>
>
>
> On Sat, Mar 11, 2017 at 7:38 AM, <[hidden email]> wrote:
>
>> Dear R-Users,
>> Please anyone to help me with this error:
>>
>> kriged=krige(Nmin~1,locationsDD,grid,model=vgm(1,"Exp",150,1))
>> Error in bbox(newdata) : object not a >= 2-column array
>>
>> Thank you so much in advance!
>> Kind Regards
>> Nina Philipova
>> _______________________________________________
>> R-sig-Geo mailing list
>> [hidden email]
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>
>
>
>
> --
> David Warner
> Research Fisheries Biologist
> U.S.G.S. Great Lakes Science Center
> 1451 Green Road
> Ann Arbor, MI 48105
> 734-214-9392
>

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Variogram & Kriging.txt (3K) Download Attachment
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error in bbox(newdata) : object not a >= 2-column array

edzer
Looks to me as if you made a typo in your script, possibly with a quote,
but I'd need to see the full script, and preferably have access the
necessary data in order to run it, to be completely sure.

On 14/03/17 09:54, [hidden email] wrote:

>> Dear David,
> Dear R users,
> Now R calculates var1.pred as a constatnt:
> kriged=krige(Nmin~1,locationsDD,grid,model=fit)
>
>> kriged["var1.pred"]
>
>
> 925  (339003.4, 2988160)  11.22117
> 926  (339013.4, 2988160)  11.22117
> 927  (339023.4, 2988160)  11.22117
> 928  (339033.4, 2988160)  11.22117
> 929  (339043.4, 2988160)  11.22117
> 930  (339053.4, 2988160)  11.22117
> 931  (339063.4, 2988160)  11.22117
> 932  (339073.4, 2988160)  11.22117
> 933  (339083.4, 2988160)  11.22117
> ........................................
> 7482 (339293.4, 2989180)  11.22117
> 7483 (339303.4, 2989180)  11.22117
> 7484 (339313.4, 2989180)  11.22117
> 7485 (339323.4, 2989180)  11.22117
> 7486 (339333.4, 2989180)  11.22117
> 7487 (339343.4, 2989180)  11.22117
> 7488 (339353.4, 2989180)  11.22117
>>
> spplot(kriged["var1.pred"])
>  Error: unexpected string constant in:
> "
> spplot(kriged[""
>
> And it cann't give ssplot
> Please if anyone can help me!
>
>
> I was getting this error as well.  The cause was either not having the
>> coordinates and coordinate reference system (CRS) set or having the wrong
>> CRS.  I did both at the same time so I am not sure which it was.
>>
>> Is your 'grid' a SpatialPixels object?
>>
>> Did you run a line like 'coordinates(grid) <- ~x + y'  ?
>>
>> If so, did you then set the CRS?
>>
>>
>>
>> On Sat, Mar 11, 2017 at 7:38 AM, <[hidden email]> wrote:
>>
>>> Dear R-Users,
>>> Please anyone to help me with this error:
>>>
>>> kriged=krige(Nmin~1,locationsDD,grid,model=vgm(1,"Exp",150,1))
>>> Error in bbox(newdata) : object not a >= 2-column array
>>>
>>> Thank you so much in advance!
>>> Kind Regards
>>> Nina Philipova
>>> _______________________________________________
>>> R-sig-Geo mailing list
>>> [hidden email]
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>>
>>
>>
>>
>> --
>> David Warner
>> Research Fisheries Biologist
>> U.S.G.S. Great Lakes Science Center
>> 1451 Green Road
>> Ann Arbor, MI 48105
>> 734-214-9392
>>
>>
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> [hidden email]
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
--
Edzer Pebesma
Institute for Geoinformatics  (ifgi),  University of Münster
Heisenbergstraße 2, 48149 Münster, Germany; +49 251 83 33081
Journal of Statistical Software:   http://www.jstatsoft.org/
Computers & Geosciences:   http://elsevier.com/locate/cageo/


_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

signature.asc (484 bytes) Download Attachment
Loading...