Error only when running whole block of code

后端 未结 1 360
攒了一身酷
攒了一身酷 2021-01-02 20:50

I have code that came with a dataset that I downloaded. This code is supposed to convert factor variables to numeric. When I run each line individually, it works fine, but

相关标签:
1条回答
  • 2021-01-02 21:20

    I figured out the issue (actually someone told me what the problem was)

    The code was downloaded as a .R file and must have been written using a text editor with non-standard "new line" coding. So I just copied the code to a text editor, did replace all to switch "\n" to "#####". Then I used replace all again to switch back to new-lines and copied it back into R studio.

    And everything works!

    0 讨论(0)
提交回复
热议问题