Good day My name is José Oscar, I'm from Mexico and I have some questions about foreign in your write.foreig( ) function. We know that this function generates the inputs to be able to run them or execute them in another program like SPSS, SAS or Stata. In these cases, when creating an example file, a matrix and using the function to execute the .sps file directly from SPSS, I don't care or work based on the SPSS environment. With Stata the problem does not arise, but this same problem also arises with SAS, in that sense or question, how could I solve this? Do you have any guides or tutorials on the correct use of the function?
This is the code: x<- matrix(data = sample(1:100, 100), nrow = 10, ncol = 10) x2<- as.data.frame(x) write.foreign(x2, "x2_spss.txt", "x2_spss.sps", package = "SPSS") [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.