Paired t test Error

Hello! I am trying to run a paired t test on a subset of data, although it is giving me this error message:

intxSubB <- t.test(Intake ~ Day, data = intxTestsubB.long, paired = TRUE)
Error in complete.cases(x, y) : not all arguments have the same length

My a sample of my subset is:

With an earlier column having PCB, Sex, and Animal ID (just would not fit in the photo).

I have a feeling the error messages mean that the two groups (Day 2 and Day 8) are uneven, which is true as Day 8 has NA, however I was wondering if there is a way to conduct the paired t test regardless of this missing data point.

Thank you!

From help(t.test)

If paired is TRUE then both x and y must be specified and they must be the same length. Missing values are silently removed (in pairs if paired is TRUE ). If var.equal is TRUE then the pooled estimate of the variance is used.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.