简体   繁体   English

有没有办法将r中的rda / RData数据加载到SAS中?

[英]Is there a way to load rda/RData data from R into SAS?

I have plenty of .rda and .RData files from R statistical packageand would like to read them into SAS. 我有很多来自R统计软件包的.rda.RData文件,并希望将它们读入SAS。 Is there an (easy) way to do this? 是否有捷径可寻?

If you can get R installed, then you could execute R code within PROC IML (assuming your SAS installation is configured properly, which can be a problem), read the results into eg a R data.frame and get the results back as described in the SAS documentation examples. 如果您可以安装R,那么您可以在PROC IML中执行R代码(假设您的SAS安装配置正确,这可能是个问题),将结果读入例如R data.frame并按照SAS文档示例。 If you do not have the SAS/IML license but have R, write the output out from R into some format SAS reads easily (eg csv). 如果您没有SAS / IML许可证但是有R,请将输出从R写入某种格式的SAS读取(例如csv)。 If you cannot get R installed on your system, can someone else with R installed do that for you? 如果您无法在系统上安装R,那么安装了R的其他人可以为您安装吗?

Otherwise, you may have to write a SAS program that can parse the RData format. 否则,您可能必须编写可以解析RData格式的SAS程序。 However, that would be a measure of desperation. 然而,这将是一种绝望的衡量标准。 I believe you would find the documentation of the format here and some discussion of the not so clear documentation here (see also ) 我相信你会找到格式的文档, 这里并没有那么清晰的文档的一些讨论在这里 (见

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM