I have a database with feed consumption per animal per day.
Here's just a portion of the base to get an idea:
Animal Time Consumo
5 1 2.53396
5 2 2.32906
5 3 2.94379
5 4 3.36162
6 1 2.89082
6 2 2.53898
6 3 2.97881
6 4 3.03876
7 1 2.81885
7 2 2.73889
7 3 2.67891
7 4 2.87885
I want to generate a graph in which only one animal (Ex: Animal = 7) has different color of the line (consumption as a function of the team) and the others have the same color. In the ggplot I was able to make a graphic so that all the animals have the same color, I just can not make a line for the animal 7 with different color. Here is the link I used:
library(ggplot2)
Consumo$Animal <- factor(Consumo$Animal)
ggplot(data = Consumo, aes(x = Time, y = Consumo, colours=Animal)) +
geom_line(color="grey") +
xlab("Time, d") +
ylab("Forecast daily feed intake,kg") +
theme_bw() +
xlim(c(5, 80)) +
ylim(c(0, 5))+
labs(title = "C: Current model") + theme(plot.title = element_text(face="bold",size=18, hjust = 0))+
theme(axis.title = element_text(size = 18),
axis.text = element_text(size = 14))