HertieDataScience / SyllabusAndLectures

Hertie School of Governance Introduction to Collaborative Social Science Data Analysis
MIT License
37 stars 60 forks source link

error trying to read textfile #55

Open ghost opened 8 years ago

ghost commented 8 years ago

dear christopher,

we are trying to read textfiles we gathered in r and it gives us a strange error. interestingly, the textfiles can be opened in excel without causing any trouble. here is the link to our code, and the error message is the following:

Error in FUN(left, right) : comparison (3) is possible only for atomic and list types

this happens when we try to run

df < read.delim(
    "data/GOToutput/#aGreekment_2015-07-01_2015-08-25.txt",
    sep="\t",
    quote="",
    comment.char=""
)

thanks for your help!

ghost commented 8 years ago

it turns out that only my computer gives me the error code. this is strange but we can continue working on the other computer. do you have any guesses what it would be?

christophergandrud commented 8 years ago

Not sure why it works on another computer, but it looks like the problem might stem from you using the less than operator < rather than the assignment operator <-. The error message means that you can't find out if the NULL object df is less than the imported data.frame.

Small side note: it is kind of weird to put the .Rmd file for Assignment 2 in a directory called assignment2.