WHAT AM I DOING WRONG: "cannot open file. No such file or directory"

here's what I'm doing, step-by-step:

  1. i'm importing .csv data into R.
  2. attach
  3. view ----- works
  4. read --- doesn't work
    ERROR: cannot open file. No such file or directory
    what am I doing wrong. It keeps happening over and over again, with multiple data sets.

You code is confusing. You read data from a csv file named MapleP into a data frame called q5 but then you tell ggplot() to use a data frame called MapleP to do the plotting. Where does MapleP come from?

I notice that the x axis of your plot is numeric when I would expect it to be categorical.

Please plot the result of using the first few rows MapleP derived from the head command, say,

NewData <- head(MapleP, 20)

and also post here the output of

dput(head(MapleP, 20))

so we can use exactly the same data you are using.

Please show the complete code that you are running and please do not edit posts in such a way that you completely change their meaning. My previous posts are now impossible to understand since they refer to deleted content. That makes the whole thread very difficult for others to follow.

2 Likes

I am a new member and can only post 1 question per 24h. I had to edit my question. You have OP to thank for that

so to answer your question, im not running any code. I'm just importing data. My question is why does R refuse to read it?

If view works then you already have "read" the data. Most functions with "read" on them are for reading data from files, this is equivalent to your first step

If you need more specific help, please provide a proper REPRoducible EXample (reprex) illustrating your issue.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.