Thank you both very much. It has to be "abarley = data.frame(cbind(as.numeric(ayield),avariety,ayear,asite))". Than the plot looks really fine!
Best regards clauida Zitat von Robert Baer <[EMAIL PROTECTED]>: > > it looks totaly different and I get the error message: > > "x should be numeric in: bwplot.formula(x = ayield ~ avariety | asite, > > data = list(ayield = c(2," > > ------------------- > > > cbind(some numeric and not numeric columns) > > > > gives you all columns to be character and when you make data.frame > > from it it is converted to factors. > > > > so > > > > > abarley = data.frame(ayield,avariety,ayear,asite) > > > > brings you close but than you need ayear to be factor. Either convert > > it in data frame or on fly > Actually, as the warning suggests, you have all factors in the dataframe but > you need to convert ayield to a numeric. Something like, > > abarley = data.frame(cbind(as.numeric(ayield),avariety,ayear,asite)) > > > > > barchart(ayield ~ avariety | asite, data = abarley, groups = > > factor(ayear), layout = c(1,5) ) > > > > HTH > > Petr > > > ____________________________ > Robert W. Baer, Ph.D. > Associate Professor > Department of Physiology > A. T. Still University of Health Science > 800 W. Jefferson St. > Kirksville, MO 63501-1497 USA > > > ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
