title: no method for coercing this S4 class to a vector for utilization of mclust
body: <p>I'm trying to use the <strong>mclust</strong> method on an <strong>.FCS</strong> format file (which is a flow cytometry format file) and I read this file into R as flowFrame object. </p>
  
  <pre><code>install.packages("openCyto") # since the old version sefaulted my R session
  library( openCyto )
  library(  flowCore)
  library(  mclust)
  
   trial1=read.FCS("export_Alcina TregMAIT_AV 10-1974 P1_CD4.fcs") 
   a=as.matrix(trial1)
  </code></pre>
  
  <p>Editors note: some of these are Bioconductor packages and you should install according to the help pages for that environment.</p>
  
  <p>However, <code>mclust</code> does not accept the .fcs file as a matrix &amp; I tried to convert it to a matrix with the function <strong>as.matrix</strong>, and I get this error:</p>
  
  <pre><code>Error in as.vector(data) :
    no method for coercing this S4 class to a vector
  </code></pre>
  
  <p>I've found similar questions where they explain you have to add <code>importMethodsFrom(S4Vectors,as.matrix)</code> into the NAMESPACE of <code>mclust</code>, which I did. I also did <code>importMethodsFrom(BiocGenerics,as.vector)</code> in the NAMESPACE of mclust. However, I'm still not able to use <code>mclust</code>.</p>
  
  <p>P.S. any advice or reading would be appreciated!</p>
  
  <p>If, anyone knows other clustering methods that use GMM model that could accept .FCS format without converting, I'd be very happy. </p>