Error message not understood
<p>I am trying to compute a function in R but, i am getting a weird error message which is not giving me any hint on what might be wrong...</p>

<p>G2M1$data is just a matrix containing data.</p>

<pre><code>library(klaR)    
out &lt;- NaiveBayes(x = G2M1$data, grouping = G2M1$labels, usekernel = TRUE, density(G2M1$data, bw = "nrd0", adjust = 1,kernel = "gaussian"))
</code></pre>

<p>error message: </p>

<pre><code>Error in sum(prior) : invalid 'type' (list) of argument
</code></pre>

<p>I am not sure why, since i am not defining any prior?</p>