I have a dataframe (df):
df<- Column1 Column2 Column3
I want to do an ifelse statement with the mean of the values of Column2 and call including two other dataframes (df2 and df3) in my statement.
Here is the formula I used:
ifelse(mean(df$Column2)<5,df2,df3)
It does not produce df2 or df3 as a dataframe.
What am I doing wrong?
From the "stupid but works" department: