I am trying to do a t-test to see if the values in two columns on two dfs are statistically different.
I am trying to run a code that compares the "Duration" column in two dfs -- "Tokens" and "Tokens.Single". Both dfs have the same number of values in their respective duration columns.
Here is the code I am trying:
# T-test for duration.
t.test(Tokens$Duration ~ Tokens.Single$Duration, paired=FALSE, var.equal=TRUE)
And this is the error message I received:
Error in t.test.formula(Tokens$Duration ~ Tokens.Single$Duration, paired = FALSE, :
grouping factor must have exactly 2 levels
Any insight is appreciated!