As was mentioned in comments, the problem is that you have a comma-separated file (csv) but you're reading it as if it where tab-separated. I can reproduce your problem and then rectify it by reading the file correctly.
First, I create a simple csv file:
df <- data.frame(day = c("Day 0", "Day 3", "Day 6"),
variable = c("Actinobacteria", "Actinobacteria", "Actinobacteria"),
value = c(0.187, 0.117, 0.153))
write.table(df, "low_group.csv", row.names = FALSE, sep = ", ")
Now, I read it in the way you do, with sep="\t" (tab-separated). The tell-tale sign that something is wrong is in the column header, day..variable..value, which is a single string, hence the data frame mdat contains only a single column:
mdat <- read.csv(file = "low_group.csv", header = TRUE, sep="\t")
head(mdat)
# day..variable..value
# 1 Day 0, Actinobacteria, 0.187
# 2 Day 3, Actinobacteria, 0.117
# 3 Day 6, Actinobacteria, 0.153
If we try to plot this we get an error. (My error message is slightly different because I run the development version of ggplot2.)
ggplot(mdat, aes(variable, value, fill=day)) + geom_col()
# Error in FUN(X[[i]], ...) : object 'variable' not found
Now let's do it correctly, without sep="\t". Now we get three separate columns in the data frame, and we can plot them.
mdat <- read.csv(file = "low_group.csv", header = TRUE)
head(mdat)
# day variable value
# 1 Day 0 Actinobacteria 0.187
# 2 Day 3 Actinobacteria 0.117
# 3 Day 6 Actinobacteria 0.153
ggplot(mdat, aes(variable, value, fill=day)) + geom_col()

variablein your dataframe. Look at whatnames(mdat)prints. It looks like you toldread.csvthat your file was tab-delimited when in fact it was probably comma-delimited - camilleday..variable..valueis a single column name, and your data has one column. Try alsodim(mdat)to check this, and replacesep="\t"withsep=""or nothing to split the data with commas - Scransom