# Warning messages: Warning messages: 1: In var(if (is.vector(x) || is.factor(x)) x else as.double(x), na.rm = na.rm) : NAs introduced by coercion 2: In xtfrm.data.frame(x) : cannot xtfrm data frames

**URL:** <https://forum.biobakery.org/t/warning-messages-warning-messages-1-in-var-if-is-vector-x-is-factor-x-x-else-as-double-x-na-rm-na-rm-nas-introduced-by-coercion-2-in-xtfrm-data-frame-x-cannot-xtfrm-data-frames/3494>\
**Category:** MaAsLin\
**Created:** [April 23, 2022, 1:49am UTC](https://forum.biobakery.org/t/warning-messages-warning-messages-1-in-var-if-is-vector-x-is-factor-x-x-else-as-double-x-na-rm-na-rm-nas-introduced-by-coercion-2-in-xtfrm-data-frame-x-cannot-xtfrm-data-frames/3494 "2022-04-23T01:49:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lephuong07](https://avatars.discourse-cdn.com/v4/letter/l/71c47a/32.png) [@lephuong07](https://forum.biobakery.org/u/lephuong07)\
**Post date:** [April 23, 2022, 1:49am UTC](https://forum.biobakery.org/t/warning-messages-warning-messages-1-in-var-if-is-vector-x-is-factor-x-x-else-as-double-x-na-rm-na-rm-nas-introduced-by-coercion-2-in-xtfrm-data-frame-x-cannot-xtfrm-data-frames/3494/1 "2022-04-23T01:49:58Z")

</div>

Hello experts,

I am trying to use MaAslin pipeline. However, I received these warning messages.

Warning messages:  
1: In var(if (is.vector(x) || is.factor(x)) x else as.double(x), na.rm = na.rm) :  
NAs introduced by coercion  
2: In xtfrm.data.frame(x) : cannot xtfrm data frames

I would like to know to solve these messages,

Thank you very much,  
Kind regards,  
Le Phuong Nguyen.

---

<div class="post-metadata">

**Author:** ![andrewGhazi](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/andrewghazi/32/2950_2.png) [@andrewGhazi](https://forum.biobakery.org/u/andrewGhazi)\
**Post date:** [April 29, 2022, 6:39pm UTC](https://forum.biobakery.org/t/warning-messages-warning-messages-1-in-var-if-is-vector-x-is-factor-x-x-else-as-double-x-na-rm-na-rm-nas-introduced-by-coercion-2-in-xtfrm-data-frame-x-cannot-xtfrm-data-frames/3494/2 "2022-04-29T18:39:20Z")

</div>

The xtfrm.data.frame(x) warning is an issue related to newer versions of R which will get fixed sooner or later, though I don’t think it’s causing any real issues at the moment. The NAs introduced by coercion is again the same warning as your other thread I believe.

---

<div class="post-metadata">

**Author:** ![lephuong07](https://avatars.discourse-cdn.com/v4/letter/l/71c47a/32.png) [@lephuong07](https://forum.biobakery.org/u/lephuong07)\
**Post date:** [May 1, 2022, 5:42am UTC](https://forum.biobakery.org/t/warning-messages-warning-messages-1-in-var-if-is-vector-x-is-factor-x-x-else-as-double-x-na-rm-na-rm-nas-introduced-by-coercion-2-in-xtfrm-data-frame-x-cannot-xtfrm-data-frames/3494/3 "2022-05-01T05:42:53Z")

</div>

Hi Andrew,

Thank you for your explanation.  
Kind regards,  
Le Phuong Nguyen.
