王汉生 商务数据分析与应用 代码 SAS+R
a=read.csv("D:/回归分析/案例数据/第1章.csv",header=T)names(a)=c("Y","X1","X2","X3")a[c(1:5),]N=sapply(a,length)MU=sapply(a,mean)SD=sapply(a,sd)MIN=sapply(a,min)MED=sapply(a,median)MAX=sapply(a,max)result=cbind(N,MU,SD,MIN,MED,MAX)
a=read.csv("D:/回归分析/案例数据/第1章.csv",header=T)names(a)=c("Y","X1","X2","X3")a[c(1:5),]N=sapply(a,length)MU=sapply(a,mean)SD=sapply(a,sd)MIN=sapply(a,min)MED=sapply(a,median)MAX=sapply(a,max)result=cbind(N,MU,SD,MIN,MED,MAX)