On 20.10.2011 18:58, Henri-Paul Indiogine wrote:
Hi Uwe! Thanks for the feedback. However, now the graph does not
draw the y-axis nor labels and gives the following error message:
Error in barplot.default(t(file.codes), beside = FALSE, names.arg = NA, :
incorrect number of names
names.arg = rep(NA, nrow(file.codes))
in that case.
Best,
Uwe Ligges
This is the R code now:
barplot(t(file.codes), beside = FALSE, names.arg=NA, legend = FALSE,
main="test stacked bar plot", xlab="documents", ylab="number of
codes", col=rainbow(ncol(file.codes)))
I have head(file.codes) at the bottom of this email.
Thanks,
HP
2011/10/20 Uwe Ligges<lig...@statistik.tu-dortmund.de>:
It is the argument *names.arg* and it has to be set to NA.
head(file.codes)
Achievement Diversity Economy EducEquity Gap HumanBenefit
DCPD-200900575.scrb 2 2 4 5 2 1
DCPD-200900595.scrb 2 0 12 0 2 1
DCPD-200900884.scrb 1 0 12 0 1 1
DCPD-201000036.scrb 2 0 1 0 1 0
DCPD-201000130.scrb 1 0 1 0 2 0
DCPD-201000636.scrb 4 0 10 3 2 1
InternatComp MathSciEng Poverty Standards TechnoSociety
DCPD-200900575.scrb 1 1 2 2 4
DCPD-200900595.scrb 1 2 0 7 7
DCPD-200900884.scrb 4 2 0 9 7
DCPD-201000036.scrb 5 1 0 2 2
DCPD-201000130.scrb 1 1 0 1 2
DCPD-201000636.scrb 2 2 0 8 1
WorkCareer DropOut Accountability AssessStudent Funding
DCPD-200900575.scrb 7 0 0 0 0
DCPD-200900595.scrb 9 2 0 0 0
DCPD-200900884.scrb 12 0 1 2 0
DCPD-201000036.scrb 5 0 0 0 1
DCPD-201000130.scrb 2 0 0 0 1
DCPD-201000636.scrb 12 0 2 1 0
Globalization AllStudents NationInterest ProfDev
DCPD-200900575.scrb 0 0 0 0
DCPD-200900595.scrb 0 0 0 0
DCPD-200900884.scrb 0 0 0 0
DCPD-201000036.scrb 0 0 0 0
DCPD-201000130.scrb 0 0 0 0
DCPD-201000636.scrb 0 0 0 0
NationDefense BestFirst AdmissionCollege
DCPD-200900575.scrb 0 0 0
DCPD-200900595.scrb 0 0 0
DCPD-200900884.scrb 0 0 0
DCPD-201000036.scrb 0 0 0
DCPD-201000130.scrb 0 0 0
DCPD-201000636.scrb 0 0 0
______________________________________________
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.