Reputation: 35
I used the following code:
data2=data.frame(x=runif(100,2,3),y=runif(100,2,3))
head(data2)
plot(data$x,data$y,main="data2",xlab="AE",ylab = "vibration")
Error in plot.window(...) : need finite 'xlim' values
In addition: Warning messages:
1: In min(x) : no non-missing arguments to min; returning Inf
2: In max(x) : no non-missing arguments to max; returning -Inf
3: In min(x) : no non-missing arguments to min; returning Inf
4: In max(x) : no non-missing arguments to max; returning -Inf
Can anyone tell me what is wrong I am doing with above syntax.
Upvotes: 0
Views: 35
Reputation: 35
One must be very carefull about the silly mistakes, The data set you are trying to generate for data has a different varaible name. data2 should be used in place of data
The code will be as follows
plot(data2$x,data2$y,main="data2",xlab="AE",ylab = "vibration")
This ensure the plot with well defined labels you expect.
Upvotes: 1