默认情况下,ftable将count作为一个值...在这个例子中,我希望得到“Alertness”列的总和。
datafilename="http://personality-project.org/r/datasets/R.appendix2.data"
data.ex2=read.table(datafilename,header=T) #read the data into a table
data.ex2 #show the data
ftable(data.ex2, row.vars = "Gender", col.vars = "Dosage" )