Are you sure that it is not just telling you that it cannot tabulate on a since it only has one value?
John Kane Kingston ON Canada > -----Original Message----- > From: santosh2...@gmail.com > Sent: Fri, 19 Apr 2013 13:29:05 -0700 > To: r-help@r-project.org > Subject: [R] tables package - error message of "duplicate values" > > Dear expeRts! > when I try summarize data using "tabular" of tables package.. > > here is an example.. >> a <- > data.frame(a=rep(10,10),b=round(runif(10,10,20)),c=round(runif(10,40,50))) >> a > a b c > 1 10 14 44 > 2 10 17 40 > 3 10 13 40 > 4 10 18 40 > 5 10 11 49 > 6 10 16 46 > 7 10 15 43 > 8 10 19 49 > 9 10 19 49 > 10 10 13 45 >> tabular((a+1)~(n=1)+Format(dig=0)*(b + c) * (mean + sd),data=a) > Error in term2table(rows[[i]], cols[[j]], data, n) : > Duplicate values: a and b > > Is there a way to let the function accept the "apparently" duplicate > values? > > Thanks, > Santosh > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. ____________________________________________________________ FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop! ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.