I want to make simple line plots similar to the ones on the tutorial for ggplot:
p1 <- ggplot(ChickWeight, aes(x=Time, y=weight, colour=Diet, group=Chick)) + geom_line() + ggtitle("Growth curve for individual chicks")
[From cookbook-r.com]
However, the examples given have the data organized efficiently (one column has the x variable, another column has the y variable).
If I have data that is not so neat (in my data, each row represents a changing observation of data), can I still use ggplot? Do I have to rearrange the data in the initial file to use ggplot?
For example, if my data reads:
Names       1991  1992  1993
Johny         40    50    80
Dana          78    70    90
How could I create a line plot for Johny's progress? Dana's?
 
     
    

 
    
