Issues with RStata package

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

I know absolutely nothing about package RStata or Stata itself.
When I read the (not very elaborate) documentation about function stata() I get the impression that you can only get dataframes back from Stata - not graphs. Anyway to get anything at all back from Stata, you seem to need
stata(...,data.out=TRUE) (which of course dosn't explain why your first example works)

/Thomas

This topic was automatically closed 21 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.