I got this R code to make visualization using ggplot. However, I am getting the problem with syntax. Can anyone see where it went wrong? Thanks!
t <- ggplot_build(p)$data[[3]]
s[i,1] <- as.character(a[i])
s[i,2] <- t[1,2] - t[(length(t[,1])),2]
The error is related to t in this three lines of code.