Replies: 1 comment
-
When I'm working in R, the most common error I encounter is definitely This error is so notorious that Jenny Bryan (a prolific data scientist and educator in the R community) gave a keynote presentation named after the error. (As an aside, I highly recommend watching the talk -- it provides a wealth of information about debugging methods in a way that is approachable and entertaining!) This error used to frustrate me to no end, but once I learned a bit more about what it is, it became much less daunting. It turns out that This leads me to what I do when I see this error -- try to figure out why R thinks I'm giving it a function to subset when I'm trying to give it a data frame. At the beginning of the error message, it includes a reference to where the error is coming from, e.g., Most often, the culprit is that my data frame isn't currently in my environment (perhaps because I restarted my session), or I haven't named my data frame what I think I have. So instead, it defaults to assuming I am referring to whatever function it knows by that name (Yes, there's a function called Thankfully, this is usually a quick fix, and its definitely become less annoying once I was able to learn more about what exactly the error is trying to tell me! |
Beta Was this translation helpful? Give feedback.
-
Share your favorite (or least favorite, or most common) error message. What do you do when it appears?
Beta Was this translation helpful? Give feedback.
All reactions