added function to add factors to a dataframe.  more tips e.g. re bwplot.