I have a dataframe df1
, out of which I am trying to fetch the unique values from a column "parameter" which in turn giving me a "factor"
I want to create an if
condition like
if (unique(df1$parameterName) == "effectivetemp"){
print('yes')
}
by doing this it says
Warning message: In if (as.factor(unique(Daily_Avg_Count$parameterName)) == "cteffectiveness") { : the condition has length > 1 and only the first element will be used.
Any suggestion will be helpful.