I am trying to open a Stata .dta
file which is compressed into winrar
in R. Here are my codes:
library(foreign)
setwd("C:/Users/ASUS/Desktop/Data on oil/Oil discovery")
data <- read.dta("oil_discovery")
and I get :
Error in read.dta("oil_discovery") : unable to open file: 'No such file or directory'
I think that my problem is coming from the assignment of my working directory but I don't know how to manage it.
read.dta()
promise to decompress? – Eamonrio::import
github.com/leeper/rio – Smoothspoken