haghish / rcall

Seamless interactive R in Stata. rcall allows communicating data sets, matrices, variables, and scalars between Stata and R conveniently
http://www.haghish.com/packages/Rcall.php
90 stars 29 forks source link

macro to R #35

Closed yanyu2015 closed 5 months ago

yanyu2015 commented 8 months ago

This is an excellent package; however, I encounter some issues. I would like to inquire whether rcall supports retrieving a global macro with multiple variables from Stata. For example:

global a "x1 x2"
rcall: (ar <- $a)

Unfortunately, this code does not execute successfully.

haghish commented 5 months ago

Hi. Please read the paper that introduces the syntax: https://journals.sagepub.com/doi/pdf/10.1177/1536867X19830891

Answer:

global a "x1 x2"
rcall: (ar <- "$a")