第三讲因子与列表.pptVIP

  • 29
  • 0
  • 约9.79千字
  • 约 37页
  • 2015-08-31 发布于重庆
  • 举报
第三讲因子与列表.ppt

若数据有不同的属性,例如在height and weight.txt文档中,奇数列是height,偶数列是weight h_w - scan(height and weight.txt, sep=\t, what=list(height=0, weight=0)) # 按行读入,一个height,一个weight顺序存放 Read 15 records h_w $height [1] 172.4 169.3 169.3 171.4 166.5 171.4 168.2 165.1 168.8 167.8 165.8 167.8 [13] 164.4 169.9 164.9 $weight [1] 75.0 54.8 64.0 64.8 47.4 62.2 66.9 52.0 62.2 65.0 62.2 65.0 58.7 57.5 [15] 63.5 读取其他格式的文件 读取SPSS数据文件 read.spss(file.sav, to.data.frame=TRUE) 读取SAS数据文件 read.xport(file.xpt) # 读入以后是个数据框 读取excel数据文件 R里面没有提供直接读取excel数据文件的命令,Microsoft的文件背后究竟是个什么谁也不知道。但可以调用RO

文档评论(0)

1亿VIP精品文档

相关文档