When I try converting a matrix to a data frame, it works for me: > x <- matrix(1:6,ncol=2,dimnames=list(LETTERS[1:3],letters[24:25])) > data.frame(x) x y A 1 4 B 2 5 C 3 6 > str(data.frame(x)) `data.frame': 3 obs. of 2 variables: $ x: int 1 2
R in Nutshell 前言 例子(nutshell包) 本书中的例子包括在nutshell的R包中,使用数据,需加载nutshell包 install.packages("nutshell") 第一部分:基础 第一章 批处理(Batch Mode) R provides a way to run a large set of commands in sequence and save the results to a file. 以batch mode运行R的一种方式是:使用系统