If you rename two or more levels with the same string, R collapses them.
Using gsub like you suggest works well. If there are more than the two
characters causing problems you may need to expand the pattern that's
being matched. With the example you sent, this works:
df - structure(c(6L, 4L,
Evidently different sized dashes were used in my data set. Using gsub or some
other method, is there a way to use a consistent dash? With the different
dash types it is difficult to build histograms, tables, barplots and perform
other analysis.Â
Thanks again for your help and insights.Â
2 matches
Mail list logo