How to write if/else statements if dataframe is empty in R
<p>I am trying to do the following:
If there is nothing in the dataframe, print "no_match". </p>

<p>If there is something, bind it to the <code>ID</code> of dataframe <code>df2</code>: </p>

<pre><code>if(df == []){
print("nomatch")
}else{
cbind(df, df2$id2)
}
</code></pre>