Hello,
I am trying to run a simple analysis (to be more accurate, to create a dataframe) in R using the R package EpisodeR available on GitHub. As I want to work on the data in Stata, I am trying to use the community-contributed package rcalll, which is also available on GitHub.
After installing both packages, I tried running the following code, knowing that st.load(df) is the rcall function to load data from R to Stata
Sadly, I get this message:
"R failed to export Stata data set"
I know that my EpisodeR code is correct because when I run it in RStudio, it creates the dataframe. So there is something I'm doing wrong when I try to bring it back into Stata.
I am using Stata 18, R 4.5, and all packages are updated.
I am clearly doing something wrong. If someone can help me to identify it, that would be much appreciated!
Thank you,
Nir
I am trying to run a simple analysis (to be more accurate, to create a dataframe) in R using the R package EpisodeR available on GitHub. As I want to work on the data in Stata, I am trying to use the community-contributed package rcalll, which is also available on GitHub.
After installing both packages, I tried running the following code, knowing that st.load(df) is the rcall function to load data from R to Stata
Code:
rcall: library(EpisodeR); /// df <- get_episode(data = EpisodeR::vdem, /// start_incl = 0.01, /// cum_incl = 0.1, /// year_turn = 0.03, /// variable = "v2xca_academ"); /// st.load(df)
"R failed to export Stata data set"
I know that my EpisodeR code is correct because when I run it in RStudio, it creates the dataframe. So there is something I'm doing wrong when I try to bring it back into Stata.
I am using Stata 18, R 4.5, and all packages are updated.
I am clearly doing something wrong. If someone can help me to identify it, that would be much appreciated!
Thank you,
Nir
Comment