Skip to content
Prev 276107 / 398506 Next

factor level issue after subsetting

That is the nature of factors.  Once created, unused levels must be xplicitly dropped

plot(droplevels(dat.sub$treat),dat.sub$yield)


Hope this is helpful,

Dan

Daniel J. Nordlund
Washington State Department of Social and Health Services
Planning, Performance, and Accountability
Research and Data Analysis Division
Olympia, WA 98504-5204



A work around is exporting and importing the new subset. Then it's