While using lattice, graph doen't appear at ONLY 1st panel

32 Views Asked by At

While I doing Course project 1 in Reproducible Research, Week2, Coursera, the problem occurs.

Here is the github link.

In this project, the problem occurs in below part.

newact_ind <- cbind(newactivity, a)
colnames(newact_ind)[ncol(newact_ind)] <- "Indicator"

new_meanstep <- tapply(newact_ind$steps, newact_ind$interval, mean)

interval <- as.integer(levels(newact_ind$interval))

library(lattice)
xyplot(new_meanstep ~ interval | Indicator, data=newact_ind, layout=c(1,2), 
       type="l", xlab="Interval", ylab="Number of steps")

This plot should show time series plot split by Indicator (weekday & weekend), but result likes below.

Why does this happening?

0

There are 0 best solutions below