Number of features used by PAM?
<p>I'm trying to use PAM as a classifier but I couldn't find a way to find how many genes are being used. Here is the code:</p>

<pre><code>install.packages("plsgenomics")
library("plsgenomics")
library("pamr")
data(Colon)
data&lt;-t(Colon$X)
rownames(data)&lt;-Colon$gene.names
grp&lt;-Colon$Y
grp = as.factor(grp)
tr.data = list(x = data, y = grp)
tr.train = pamr.train(tr.data)
new.scales &lt;- pamr.adaptthresh(tr.train)
tr.train2 &lt;- pamr.train(tr.data, threshold.scale=new.scales,prior = c(0.5,0.5))


  tr.train2
  Call:
  pamr.train(data = tr.data, threshold.scale = new.scales, prior = c(0.5, 
0.5))
  threshold nonzero errors
1  0.000     2000    18    
2  0.189     1490    13    
3  0.379     1128    11    
..........................

28 5.112        1    9     
29 5.301        1    9     
30 5.490        0    40    

 &gt; new.scales
        1        2 
 1.000000 2.867972
</code></pre>