I am having trouble with what seems to be a very basic R statement:
while (count < 10) { print(count) count <- count + 1}
Error: unexpected symbol in "while (count < 10) { print(count) count"
What is causing the error?
I am having trouble with what seems to be a very basic R statement:
while (count < 10) { print(count) count <- count + 1}
Error: unexpected symbol in "while (count < 10) { print(count) count"
What is causing the error?
Generally I would put the "more than simple call" on multiple lines as follows:
while (count < 10) {
print(count)
count <- count + 1
}
This makes what you're doing clearer and avoids problems like you're getting.