Question:I have a dataset of ids, months and some metric x.
id == "a1", the 2nd month’s x is NA. (error: Input
x_growth_startcan’t be recycled to size 3.)
integer(0). Can I make the code run (say, by letting it return
integer(0))? I tried what was suggested here but it didn’t work Input `typ` can’t be recycled to size in R
Thanks in advance.
Answer:You should use
match(). It returns
NAwhen no match is found.
If you have better answer, please add a comment about this, thank you!