My question is about the write.foreign() command in the foreign package. I use a command like the following to try and output data and a code file to read my data into SAS.

write.foreign(data.frame.object, datafile="filepath", codefile="filepath", package="SAS", dataname="myData")

With my data set, it gives the following error:

Error in make.SAS.names(names(df), validvarname = validvarname) :
Cannot uniquely abbreviate the variable names to 32 or fewer characters

I tried to write reproducible code but could not. I'm not sure where to go from here. What are the naming protocols for variables so that they can be exported using write.foreign()?

Thanks!

Andrew Miles

______________________________________________
R-help@r-project.org mailing list
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.

Reply via email to