I have two dataframes with two columns df1$Credits and df2$Credits.
I want to construct an ifelse statement that if df2$Credits is lower than df1$Credits than it automatically defaults to df1$Credits.
So far I have something like this
ifelse(df2$CreditTY < df1$CreditTY, df2$CreditTY <- df1$CreditTY, df2$CreditTY)
Would something like this work?
I tried using the above ifelse statement but it seems to default to the lower version
Donal M is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.