Hi everyone. I'm a STATA user (not an advanced one) but I need to replicate my results in R.

I've managed to install RSTATA package with the following codes:

install.packages('RStata')

library(RStata)

options("RStata.StataPath" = "/Applications/Stata/StataSE.app/Contents/MacOS/stata-se")

options("RStata.StataVersion" = 17)

If I try to run some basic analysis such as

command <- "sysuse auto, clear

sum mpg "

stata(command)

I get the right results in my console.

But I do not understand How to create graphs. For example If I try to draw an histogram with the following

codes:

command <- "sysuse auto, clear

hist mpg "

stata(command)

It actually runs and I don't get any error message but R does not generate any graph.

Can anyone help me?

Thanks a lot