-1

I am experiencing a weird error when trying to open my ASC file in R Studio. What is especially puzzling is that one day ago, this has still been working.

I use the following function to open an ASC file:

test_dat <- read.asc("example_file.asc")

And I keep receiving this error:

Error in read.asc("example_file.asc") : could not find function "read.asc"

I did not remove or uninstall any packages I have been using before (when it was still working). I would be very thankful for any recommendation about what the issue could be.

Thanks a lot in advance!

r2evans
  • 141,215
  • 6
  • 77
  • 149
sa-al
  • 3
  • 3
  • I'm going to guess that you're referring to `SDMTools::read.asc`, I cannot find any other package (in my quick look) that includes a function by that name. Unfortunately, `SDMTools` was [removed from CRAN](https://cran.r-project.org/web/packages/SDMTools/index.html) in 2020. But ... in case you still have it installed, are you sure that you called `library(SDMTools)` in this current session? – r2evans Aug 24 '23 at 15:56
  • Related: https://stackoverflow.com/q/7027288/3358272 – r2evans Aug 24 '23 at 15:56
  • Hi r2evans, Thanks for your answer! I guess I have not installed the package you mentioned since I am very new to R and just installed it a month ago. These are the packages I have installed and the function has been working since yesterday: devtools, eyelinker, tidyverse, eyetrackingR, dplyr and stringr. – sa-al Aug 24 '23 at 18:44
  • Most of my point was that we don't know where `read.asc` is defined. I found one mention for the `SDMTools` package, but since you mentioned `eyelinker`, it is supposedly defined there. In future questions, please be explicit about non-base packages you're using. Have you try `library(eyelinker)` and retried your code above? – r2evans Aug 24 '23 at 18:53
  • Makes completely sense, please excuse that I did not mention that in the beginning. Is there any way I can find out to which package the function read.asc belongs? Yes, I tried library(eyelinker), but unfortunately, it still does not work out. – sa-al Aug 25 '23 at 07:50
  • Did you go to the link I provided in my second comment? Did `library(eyeliner)` complete without warning/error? – r2evans Aug 25 '23 at 11:09
  • 1
    It is working again, but I do not know what made it function again. Anyways, Thanks a lot for your help! – sa-al Aug 25 '23 at 12:33

0 Answers0