title: SPIAT package Error in define_celltypes(formatted_image, phenotypes = c("panCK+", "CD8+", : could not find function "define_celltypes"
body: <p>I use the SPIAT package (<a href="https://cancer-evolution.github.io/SPIAT/articles/introduction.html" rel="nofollow noreferrer">https://cancer-evolution.github.io/SPIAT/articles/introduction.html</a>) to analyze the spatial distribution patterns of tumor and immune cells in human tissue samples. THe package is really useful, however in one of the functions the package provides I get an error message: &quot;Error in define_celltypes(formatted_image, phenotypes = c(&quot;panCK+&quot;, &quot;CD8+&quot;,  :
  could not find function &quot;define_celltypes&quot;.</p>
  <p>I try to specifying each Phenotype using the so-called define_celltypes function which can be used to add a column indicating the cell type. By default the column is called Cell.Type. The difference between Phenotype and Cell.Type is that phenotype represents all the markers present on the cell but Cell.Type is the identity of the cell.</p>
  <p>Here is the code and the R file with the txt.file.
  <a href="https://drive.google.com/drive/folders/1lX9Sprd3IDxz08AcJnZ7WT4UE96MWZCC?usp=sharing" rel="nofollow noreferrer">https://drive.google.com/drive/folders/1lX9Sprd3IDxz08AcJnZ7WT4UE96MWZCC?usp=sharing</a></p>
  <p>Your help would be much needed! Thank you.</p>
  <pre><code>&gt; phenotypes = c(&quot;panCK+&quot;, &quot;CD8+&quot;, &quot;FoxP3+&quot;, &quot;CD163+&quot;, &quot;PD_L1+&quot;) 
  &gt; names = c(&quot;Tumour&quot;, &quot;TILs&quot;, &quot;Tregs&quot;, &quot;Macrophages&quot;, &quot;PD-L1+ cells&quot;)
  &gt; #SPIAT define_celltypes can be used to add a column indicating the cell type. 
  &gt; #By default the column is called Cell.Type. The difference between Phenotype and Cell.
  &gt; #Type is that phenotype represents all the markers present on the cell but Cell.Type is the identity of the cell.
  &gt; formatted_image &lt;- define_celltypes(formatted_image, 
  +                                     phenotypes = c(&quot;panCK+&quot;, &quot;CD8+&quot;, &quot;FoxP3+&quot;, &quot;CD163+&quot;, &quot;PD_L1+&quot;), 
  +                                     names = c(&quot;Tumour&quot;, &quot;TILs&quot;, &quot;Tregs&quot;, &quot;Macrophages&quot;, &quot;PD-L1+ cells&quot;), 
  +                                     column.name = &quot;Cell.Type&quot;)
  Error in define_celltypes(formatted_image, phenotypes = c(&quot;panCK+&quot;, &quot;CD8+&quot;,  : 
    could not find function &quot;define_celltypes&quot;```
  </code></pre>