lbraglia / RStata

[R package]: A R-Stata interface
112 stars 37 forks source link

When I call stata using the RStata package, some problems occur.I don't know how to solve them. #19

Open NankaiSunLu opened 3 years ago

NankaiSunLu commented 3 years ago

Hello ! my computer system is Windows.When I call stata using the RStata package,the probelm --"Error in seq.int(cutpoints[1] + 1, cutpoints[2] - 1) : 'from' must be a finite number " occours .

code ::

library(RStata) options("stata_path" = "D:/Stata16/StataMP-64") options("RStata.StataVersion" = 16) head(iris) suppressMessages(library(dplyr)) dat_r <- iris %>% select(Sepal.Length,Sepal.Width,Petal.Length) %>% rename(y=Sepal.Length, x1=Sepal.Width, x2=Petal.Length ) head(dat_r) r_string_stata_command <- 'reg y x1 x2' stata(r_string_stata_command, data.in = dat_r,stata.path = getOption("stata_path"), stata.version = getOption("RStata.StataVersion"))

how to solve it ? Thanks