Skip to content
Prev 360558 / 398503 Next

How to print the frequency table (produced by the command "table" to Excel

Hi jpm miao,
I think you can get what you want like this:

alpha1<-sample(LETTERS[1:3],50,TRUE)
alpha2<-sample(LETTERS[1:2],50,TRUE)
alphas<-data.frame(alpha1,alpha2)
library(prettyR)
alphatab<-xtab(alpha1~alpha2,alphas)
sink("temp_table3.csv",append=TRUE)
delim.xtab(alphatab,pct=NA,delim=",")
sink()

Jim
On Sun, May 1, 2016 at 4:47 AM, jpm miao <miaojpm at gmail.com> wrote:
Message-ID: <CA+8X3fWC_Uj1oOhmVag=Nh8rorL2Mb=Khq3-JOrDCk8-BvOt1w@mail.gmail.com>
In-Reply-To: <CABcx46AsBxGTurGu9hJ9+XUFg+o0hyQYt6k=qiP4TWJWQc=imQ@mail.gmail.com>