Toptable error, wont recognize condition I am getting a rather strange error from topTable.    When I run my code I get Error in fit$coefficients[, coef] : subscript out of bounds from topTable as if it is not recognizing the condition I am asking it to return the top ten DEGs of. I have provided a bit more context and some descriptions of my variables below.  Let me know if you need any more information or if anything is unclear.
Variables:
dge is a DGEList object of RNA seq data.
dge$counts is the raw counts.
dge$samples$dge_meta is the metadata and log2 transformed counts.
&gt; colnames(dge$samples$dge_meta)
 [1] &quot;Lab.sample.ID&quot;                                              
 [2] &quot;Accession.Number&quot;                                           
 [3] &quot;Alias.used.in.some.figures&quot;                                 
 [4] &quot;Developmental.stage&quot;                                        
 [5] &quot;Infected&quot;                                                   
 [6] &quot;Batch&quot;                                                      
 [7] &quot;Trimmed&quot;                                                    
 [8] &quot;Number.of.reads.that.pass.Illumina.filter&quot;                  
 [9] &quot;Total.number.of.reads.mapped&quot;                               
[10] &quot;%.of.total.reads.mapped&quot;                                    
[11] &quot;Reads.mapped.to.T..cruzi.Esmeraldo.haplotype&quot;               
[12] &quot;Reads.mapped.to.hg19&quot;                                       
[13] &quot;%.of.mapped.reads.belonging.to.T..cruzi.Esmeraldo.haplotype&quot;
[14] &quot;%.of.mapped.reads.belonging.to.hg19&quot;                        
[15] &quot;sample&quot;                                                     
[16] &quot;hpi&quot;

Lastly keep_it is a binary vector used to filter our zero count genes.
Code:
mm &lt;- model.matrix(~~hpi*Infected, data = dge$samples$dge_meta) #making our design matrix

more_than_1cpm_model &lt;- voom(dge$counts[keep_it,], mm, plot = TRUE) #this one is filtered by the 25% greater than 1 cpm

cutoff &lt;-  1e-05

empBayesfit &lt;- eBayes(fit_gt1cpm)

topTable(empBayesfit,
         coef = c(&quot;Infected&quot;),
         p.value = cutoff, number = 10)

Error message:
Error in fit$coefficients[, coef] : subscript out of bounds

To understand the context better I ran rlang::last_error and rlang::last_trace as well.
&gt; rlang::last_error()
&lt;error/dplyr_error&gt;
arrange() failed at implicit mutate() step. 
* Problem with `mutate()` input `..1`.
x Input `..1` must be a vector, not a `standardGeneric` object.
i Input `..1` is `samples`.
Backtrace:
Run `rlang::last_trace()` to see the full context.
&gt; rlang::last_trace()
&lt;error/dplyr_error&gt;
arrange() failed at implicit mutate() step. 
* Problem with `mutate()` input `..1`.
x Input `..1` must be a vector, not a `standardGeneric` object.
i Input `..1` is `samples`.
Backtrace:
     x
  1. +-dplyr::arrange(x, samples)
  2. +-dplyr:::arrange.data.frame(x, samples)
  3. | \-dplyr:::arrange_rows(.data, dots)
  4. |   +-base::withCallingHandlers(...)
  5. |   +-dplyr::transmute(new_data_frame(.data), !!!quosures)
  6. |   \-dplyr:::transmute.data.frame(new_data_frame(.data), !!!quosures)
  7. |     +-dplyr::mutate(.data, ..., .keep = &quot;none&quot;)
  8. |     \-dplyr:::mutate.data.frame(.data, ..., .keep = &quot;none&quot;)
  9. |       \-dplyr:::mutate_cols(.data, ...)
 10. |         +-base::withCallingHandlers(...)
 11. |         \-mask$eval_all_mutate(quo)
 12. +-dplyr:::abort_glue(...)
 13. | +-rlang::exec(abort, class = class, !!!data)
 14. | \-(function (message = NULL, class = NULL, ..., trace = NULL, parent = NULL, ...
 15. |   \-rlang:::signal_abort(cnd)
 16. |     \-base::signalCondition(cnd)
 17. +-(function (e) ...
 18. | \-rlang::abort(...)
 19. |   \-rlang:::signal_abort(cnd)
 20. |     \-base::signalCondition(cnd)
 21. \-(function (cnd) ...
The error is telling you that there isn't any Infected column on the model.matrix.
Check the column names of mm. Also not sure that having two ~ will work well.