Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
2 つの要因を評価して、それらが同じ数のレベルを持っているかどうかを確認することは可能ですか?もしそうなら、どのレベルが一方または他方に存在しないかを確認できますか?
factor1とfactor2が2つの要因である場合は、とを見levels(factor1)てくださいlevels(factor2)。
factor1
factor2
levels(factor1)
levels(factor2)
同数のレベル:
length(levels(factor1)) == length(levels(factor2))
一方の値と他方の値:
setdiff(levels(factor1), levels(factor2)) setdiff(levels(factor2), levels(factor1))