Reputation: 2840
I'm trying to plot a data frame I created from a csv where it goes DataTime, value1, value2, and the datetime is represented like this MM/DD/YYYY HH:MM.
Whenever I try to run the command plot(dataFrame[1], dataFrame[2]), I get the error 'x' and 'y' lengths differ. I've checked both of the columns, and they have the same number of items.
Is there something else I'm missing, or am I comparing two different things and it's causing the plot function to fail?
Upvotes: 1
Views: 496
Reputation: 577
Try this:
plot(dataFrame[,1], dataFrame[,2])
this way you pull the entire column
Upvotes: 2