Skip to content

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

@NankaiSunLu

Description

@NankaiSunLu

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions