I want to import ASCII dat file using dct.

ascii_data <- read.SAScii("natl2001.dat","natl2001.dct")
Error in file(con, "r") : cannot open the connection
In addition: Warning message:
In file(con, "r") :
cannot open file 'natl2001.dct': No such file or directory

Hi @sengaung, this error:

Said that R not being able to find the file 'natl2001.dct' in your current working directory.
Did you set the working directory ?

For set de working directory:

# For know you current work directory use
getwd()

# For put other work directory use:
setwd("path/to/your/directory")

In addition check the connection in this part:

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.