R引入其他统计软件数据的扩…



R引入其他统计软件数据的扩展包是foreign,

在主窗口命令提示符下键入“library(foreign)”后,R软件载入“foreign”模块,

可以读入Minitab, S, SAS, SPSS, Stata, Systat, dBase等软件相应格式的数据:
读入epi5~6的数据命令为read.epiinfo(“文件名.rec”);
读入Stata5~10数据命令为read.dta(“文件名.dta”);
对于SAS,R只能读入SAS Transport format(XPORT)文件,

因此需要将常规的SAS数据文件(.ssd和.sas7bdat)转换为Transport format(XPORT)文件,再用命令read.xport( )读入,需注意:

1.采用stattransfer软件转化

2.import and put it into the same folder as your R working directory,

In order to check what your R working directory is type:
> getwd()

If the directory it returns is not the directory you would like to use, then simply use the following function to set your working directory:

> setwd()

一定要把文件 into the same folder as your R working directory

 

 


读入SPSS数据文件命令为read.spss( );读入.DBF格式文件命令为read.dbf();读入Systat软件.syd格式数据文件命令为read.systat();
读入Minitab数据命令为read.mtp()。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值