search for: y_point7

Displaying 2 results from an estimated 2 matches for "y_point7".

2017 Jul 19
2
spaghetti plot - urgent
...= as.data.frame(matrix(tj_gerar,nrow=subjects,ncol=1) ) # time point7 <- cbind(beta0_7, beta1_7, tj, epsilon_7) point7 point7 <- as.data.frame(point7) colnames(point7) = c("beta0_7","beta1_7","time", "epsilon_7") y_point7 <- point7$beta0_7 + point7$beta1_7*point7$time + point7 $epsilon_7 (the outcome of the study - PCR) y_point7 require(ggplot2) png('test.png') p = ggplot(y_point7, aes(time, y_point7)) + geom_line() print(p) dev.off() savehistory() OR: In the last part I also tried: ID = rep(1...
2017 Jul 19
0
spaghetti plot - urgent
Hi Rosa, You pass a vector to ggplot, which expects a data.frame. I am sure you meant to do this: point7$y_point7 <- point7$beta0_7 + point7$beta1_7*point7$time + point7 $epsilon_7 ggplot(point7, aes(time, y_point7)) + geom_line() HTH Ulrik On Wed, 19 Jul 2017 at 20:37 Rosa Oliveira <rosita21 at gmail.com> wrote: > Hi everyone, > > I?m trying to do a spaghetti plot and I know I?m doing a...