I have a project where I have imported data from ofs website. "Data_Replication_Sahakyan_et_al2009.dta" , it loaded, but I went a little crazy changing the chunks and erased the code. Now can't knit the markdown because R states that obj DF not found. Is there any way to start over? I have tried to do the data screening and the subletting I did is still in the markdown even after I deleted the file and downloaded it again. Any help would be appreciated I have attached what I did and the error messages I get. Is my data saved as DF now or how can I change the data to knit the markdown.
> library(ez)
> library(ggplot2)
> library(rio)
> DF <- import("Data_Replication_Sahakyan_et_al2009.dta")
Error: No such file: Data_Replication_Sahakyan_et_al2009.dta
> str(DF)
'data.frame': 113 obs. of 3 variables:
$ subject: num 1 3 5 6 7 8 9 10 11 12 ...
$ List_1 : num 6 6 8 3 7 5 5 7 4 7 ...
$ sex : num 2 1 2 2 2 2 2 2 1 2
I have looked on stack overflow and could not find any similar situations. Maybe I need to ask a different question. I tried to delete the file and restarted R session after I broomed out the environment. That did not help either. Thank you for your time.
This line is saying that your data file on your computer cannot be found:
> DF <- import("Data_Replication_Sahakyan_et_al2009.dta")
Error: No such file: Data_Replication_Sahakyan_et_al2009.dta
Make sure the .dta file is where you expect it on your computer and that your working directory is set to find it. As an initial step, maybe figure out the entire absolute path to that file on your computer and use that:
DF <- import("path/to/your/file")