0

I'm getting this error:

Error: unexpected string constant in "colnames(dji)[dm[2]] [1] "..11""

when running this command:

colnames(dji)[dm[2]] [1] "..11"

Basically, the exact same thing is done here, it has all the coding.

But with Amazon stock. Thank in advance!

ikos23
  • 4,879
  • 10
  • 41
  • 60
  • What do you expect `".. 11"` to do? To R, this is a misplaced string it cannot understand. – Jordi Apr 04 '18 at 16:33
  • That packtpub article is poorly formatted (it's just wrong!). There should be a newline before the `[1]`, indicating that `[1] "..11"` is *output from R*, not part of intended input command. Those three lines: show the column name before the change, then makes the change, then shows the changed column name (again, the `[1] "Direction"` should be on its own line). – r2evans Apr 04 '18 at 19:16

1 Answers1

1

You mistook output like

[1] "..11"

for part of the command. Leave it out.

Jordi
  • 1,313
  • 8
  • 13