SyntaxFix
Write A Post
Hire A Developer
Questions
Can you change the if condition to this:
if (!is.na(comments[l])) print(comments[l]);
You can only check for NA values with is.na().