# Error "\`x\` and \`y\` must share the same src," when trying to include covariates in lm\_meta

**URL:** <https://forum.biobakery.org/t/error-x-and-y-must-share-the-same-src-when-trying-to-include-covariates-in-lm-meta/2533>\
**Category:** MMUPHin\
**Created:** [August 30, 2021, 5:59pm UTC](https://forum.biobakery.org/t/error-x-and-y-must-share-the-same-src-when-trying-to-include-covariates-in-lm-meta/2533 "2021-08-30T17:59:28Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![drelo](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/drelo/32/566_2.png) [@drelo](https://forum.biobakery.org/u/drelo)\
**Post date:** [May 31, 2022, 7:34pm UTC](https://forum.biobakery.org/t/error-x-and-y-must-share-the-same-src-when-trying-to-include-covariates-in-lm-meta/2533/10 "2022-05-31T19:34:11Z")

</div>

> [@sma](#):
>
> Bioc3.13

Dear @sma I am trying this option (passing the reference as as part of the ‘control’ list) now with 2 other variables, both of them have more than 2 levels.

```auto
fit_lm_meta_taxSR <- lm_meta(feature_abd = metaphlanSR,
                         batch = "study",
                         exposure = "response",
                         covariates = c("sex", "age", "drug"),
                         data = MeTaSR, 
        control = list(verbose = FALSE, output = "MetaSR.XY", reference='drug,one'))

```

[Inspired by this reply I also tried…](https://forum.biobakery.org/t/multiple-variables-used-as-the-references/2854/4)

```auto
control = list(verbose = FALSE, output = "MetaXXX", 
                       fixed_effects = c("drug"), reference=c("drug,one"))

```

Here is the version I just re installed

```auto
 tools:::.BioC_version_associated_with_R_version()
[1] ‘3.13’
sessionInfo() ... MMUPHin_1.6.2 

```

My questions are (1) is how is the correct way to pass the reference as part of the _control_ arguments (2) how do I pass multiple variables with their references?

Thanks for your help!

Andrés

---

_[View the full topic](https://forum.biobakery.org/t/error-x-and-y-must-share-the-same-src-when-trying-to-include-covariates-in-lm-meta/2533)._
