R Error: names() applied to a non-vector
问题 I have a chunk of code which produces an error only the first time I run it. Strangely if I run it a second time I get no error (craziness definition?). Also the error does not show up always at the same position, I mean that if I add a few lines of comments the error message is printed after the comments and not after a specific instruction. I cannot provide a reproducible example because I do not know where exactly the error comes from. The error is the following: Error in names(frame)