All your groups are NA. Can you produce data that has groups included?
Or can you create fake data that resembles your actual data enough to work with?
Or can you filter out the NA groups then try head(data, 20) again?
Keep trying, you'll get there.
You almost have it. See here, I added a couple of groups
df<-data.frame(stringsAsFactors=FALSE,
row.names = c("Hauck-013-1A31","Hauck-014-1B31",
"Hauck-015-1C31",
"Hauck-016-2A31",
"Hauck-017-2B31",
"Hauck-018-2C31"),
distances = c(57.3039396454089,48.6048873728772,
59.7256598344438,
70.6678419043269,
52.1992713821929,
50.5899888666069),
group = as.factor(LETTERS[1:2])
)
ggplot(df, aes(x=group, y=distances, fill=group)) + geom_boxplot() +
xlab("") +
ylab("Distance to centroid") +
theme(axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1))
labs(fill="Treatment")
