title: DiceKriging / Full 2nd order polynomial
body: <p>The following message appears while running DiceKriging (in R) with full 2nd order polynamial (2D):</p>
  
  <blockquote>
    <p>Error in model.frame.default(object, data, xlev = xlev) :<br>
    Variablenlängen sind unterschiedlich (gefunden für 'I(inputs[, 1]^2)')</p>
  </blockquote>
  
  <p>In English:</p>
  
  <blockquote>
    <p>Variable lengths differ (found for 'I (inputs [1] ^ 2)')</p>
  </blockquote>
  
  <p>Script:</p>
  
  <pre><code>#Modeling
  
      xa&lt;-c(1,2,3,4,5,6)
      xb&lt;-c(1,2,3,4,5,6)
      inputs&lt;-expand.grid(xa,xb)
      output&lt;-c(1,4,7,18,23,35,1,4,9,18,23,35,1,4,7,18,1,35,1,4,7,18,35,35,1,4,7,18,23,35,1,4,7,18,23,35)
      m2 &lt;- km(formula = ~.^2 + I(inputs[,1]^2) + I(inputs[,2]^2), design = data.frame(x = inputs), response = output)
  
  #prediction
  
      x11 &lt;- seq(1,6, by = 0.1)
      x22 &lt;- seq(1,6, by = 0.1)
      DESIGNX &lt;- expand.grid(x11, x22)
      newdata &lt;- data.frame(x = DESIGNX)
      DESIGNY &lt;- predict(m2, newdata, "UK")$mean
  
  #Error in model.frame.default(object, data, xlev = xlev) : 
   # variable lengths differ (found for 'I(inputs[, 1]^2)')
  </code></pre>