I need help altering this if else statement. I am trying to make a loop that will compare the lengths of DerpSubsetN and DerpSubsetT. Each time the loop is ran there will be different lengths tested against each other. My ultimate goal is to say if one is larger, it is cut to the length of the shorter one. This is being done in the programming language R.
For example,
Start with:
DerpSubsetT length = *47*
DerpSubesetN length =*59*
End with:
DerpSubsetT length = *47*
DerpSubesetN length =*47*
> `if(length(DerpSubsetN)>length(DerpSubsetT))
{
length(DerpSubsetN)==length(DerpSubsetT)
}`
^This code above just returns a FALSE statement. How do you set it equal to the shorter length?
We should add that
.. but a data.frame is a list, so this is valid