I have this little bit of R code. And I keep getting an error message: "unexpected symbol in...."
I wrote another line under it to see what would happen and the error moved down to that line!
It then told me the error was in that line - while mentioning nothing about the previous error.
That means the interpreter has passed the first line as okay. Doesn't it?
So I delete all of that thinking maybe there's a hidden char or something.
Then I write it in again. And the error comes back. It won't accept the line.
Can anyone help?
this is the code - it's full of test prints...
for(z in 1:20){
startval <- Int[z]
for ( i in 1:24) {
cat("startval")
cat(startval)
cat("Int)
cat(Int)
diff - Int - startval **** this is the line it flags as in error.
cat("diff")
print(diff)
addup <- addup + diff
cat("addup")
print(addup)
}
cat("Int")
cat(i)
print(addup)
}
I wrote another line under it to see what would happen and the error moved down to that line!
It then told me the error was in that line - while mentioning nothing about the previous error.
That means the interpreter has passed the first line as okay. Doesn't it?
So I delete all of that thinking maybe there's a hidden char or something.
Then I write it in again. And the error comes back. It won't accept the line.
Can anyone help?
this is the code - it's full of test prints...
for(z in 1:20){
startval <- Int[z]
for ( i in 1:24) {
cat("startval")
cat(startval)
cat("Int)
cat(Int)
diff - Int - startval **** this is the line it flags as in error.
cat("diff")
print(diff)
addup <- addup + diff
cat("addup")
print(addup)
}
cat("Int")
cat(i)
print(addup)
}