[SOLVED] 2D Kriging Warning Message

Any question regarding the Interpolation method using Kriging

[SOLVED] 2D Kriging Warning Message

Postby Jeffrey Yarus » Mon Apr 12, 2021 7:41 pm

Hi Folks:

Another question for you... 
I have run the following code to produce a directionally kriged map.  Although the code seems to work, I am trying to understand the warning I am getting.  Can you shed some light on this for me?
Here is the code:
```{r, warning = TRUE, fig.height = 8, fig.width = 5.5}
dbgrid4 <-
  kriging(db_noout.db, dbgrid2, data.model.4dir, neigh.unique, radix = "dir")
plot(
  dbgrid4,
  pos.legend = 7,
  cex = 0.7,
  title = paste(property, "Kriging With Directionality"),
  xlab = "X (UTM)"
)
plot(
  dbgrid4,
  name.contour = "dir.P_KH_md.estim",
  nlevels = 11,
  col = ("black") ,
  add = TRUE
)
plot(
  db_noout.db,
  add = TRUE,
  pch = 20,
  name.post = property,
  col = "blue",
  size = 2
)
```
Here is warning:
is.na() applied to non-(list or vector) of type 'S4'is.na() applied to non-(list or vector) of type 'S4'is.na() applied to non-(list or vector) of type 'S4'is.na() applied to non-(list or vector) of type 'S4'NAs introduced by coercionNAs introduced by coercionis.na() applied to non-(list or vector) of type 'S4'is.na() applied to non-(list or vector) of type 'S4'is.na() applied to non-(list or vector) of type 'S4'is.na() applied to non-(list or vector) of type 'S4'NAs introduced by coercionNAs introduced by coercionNAs introduced by coercionNAs introduced by coercionNAs introduced by coercionNAs introduced by coercionNAs introduced by coercionNAs introduced by coercion

I sent Didier the db structure (there is one one outlier which is suppressed)
I also sent Didier the resulting figure which IS CORRECT! The question is to understand the warning.
Jeffrey Yarus
 
Posts: 48
Joined: Wed Jun 26, 2019 9:39 pm

Re: 2D Kriging Warning Message

Postby Fabien Ors » Tue May 11, 2021 5:55 pm

Dear Jeffrey

Sorry for my late answer.
I don't explain these warnings but I know that they are generated by RStudio when "Chunk Output Inline" option is activated.
There is no such behavior when running the script from an R console. As you noticed, the results are corrects.
More details here :
viewtopic.php?f=23&t=388&hilit=NAs+introduced+by+coercion&start=10
viewtopic.php?f=6&t=394&p=873&hilit=NAs+introduced+by+coercion#p873

Best regards,
Fabien
Fabien Ors
Administrateur du site
 
Posts: 226
Joined: Thu Sep 20, 2012 1:07 pm


Return to Kriging

Who is online

Users browsing this forum: No registered users and 2 guests