Displaying 9 results from an estimated 9 matches for "crp7".
Did you mean:
cr7
2017 Jul 28
3
Superscript and subscrib R for legend x-axis and y-axis and colour different subjects in longitudinal data with different colours
...use I?m using longitudinal data?
Even more. Is it possible to colour each one of the 15 lines with a different colour?
library(ggplot2)
library(reshape)
library(lattice)
library(gtable)
library(grid)
attach(mtcars)
beta0 = rnorm (15, 1, .5)
beta1 = rnorm (15, -1, .5)
tempo = seq(1:5)
CRP7raw = matrix(NA, 15, 5)
CRP7 = matrix(NA, 15, 5)
CRP98raw = matrix(NA, 15, 5)
CRP98 = matrix(NA, 15, 5)
crp <- for (i in 1:15) {
CRP7raw[i,] = beta0[i] + beta1[i] * tempo
CRP7[i,] = CRP7raw[i,] + rnorm(5, 0, 2.14)
CRP98raw[i,] = beta0[i] + beta1[i] * tempo
CRP98[i,] = CRP98raw...
2017 Jul 31
2
Superscript and subscrib R for legend x-axis and y-axis and colour different subjects in longitudinal data with different colours
> Hi Rosa
> something like
> plot(1,1, sub=expression(lambda^"2"))
> So with your example, do you want something like
> plot(c(1:5), CRP7raw[1,], type = "n", xlim=c(1,5), ylim=c(-10,5) ,
> xlab="Day in ICU",
> ylab="CRP (mg/dL)",
> sub = mtext(expression(lambda^2)))
OOps! Either plot( ..., sub = *)
or plot( ... ) ; mtext(*)
but not both!
> CRP7graph <- app...
2017 Jul 31
0
Superscript and subscrib R for legend x-axis and y-axis and colour different subjects in longitudinal data with different colours
Hi Rosa
something like
plot(1,1, sub=expression(lambda^"2"))
So with your example, do you want something like
plot(c(1:5), CRP7raw[1,], type = "n", xlim=c(1,5), ylim=c(-10,5) ,
xlab="Day in ICU",
ylab="CRP (mg/dL)",
sub = mtext(expression(lambda^2)))
CRP7graph <- apply(CRP7, 1, lines, col="gray")
Cheers
Petr
> -----Original Message-----
> From: R-help [...
2017 Jul 31
0
Superscript and subscrib R for legend x-axis and y-axis and colour different subjects in longitudinal data with different colours
...s and y-axis and
> colour different subjects in longitudinal data with different colours
>
>
> > Hi Rosa
> > something like
>
> > plot(1,1, sub=expression(lambda^"2"))
>
> > So with your example, do you want something like
>
> > plot(c(1:5), CRP7raw[1,], type = "n", xlim=c(1,5), ylim=c(-10,5) ,
> > xlab="Day in ICU",
> > ylab="CRP (mg/dL)",
> > sub = mtext(expression(lambda^2)))
>
> OOps! Either plot( ..., sub = *)
> or plot( ... ) ; mtext(*)
>
>...
2017 Jul 31
4
Superscript and subscrib R for legend x-axis and y-axis and colour different subjects in longitudinal data with different colours
...h different colours
>>
>>
>> > Hi Rosa > something like
>>
>> > plot(1,1, sub=expression(lambda^"2"))
>>
>> > So with your example, do you want something like
>>
>> > plot(c(1:5), CRP7raw[1,], type = "n", xlim=c(1,5),
>> ylim=c(-10,5) , > xlab="Day in ICU", > ylab="CRP
>> (mg/dL)", > sub = mtext(expression(lambda^2)))
>>
>> OOps! Either plot( ..., sub = *) or plot( ... ) ;
>> mtext(*)
&...
2017 Jul 19
2
spaghetti plot - urgent
...;- cbind(ID,beta0_7, beta1_7, tj, epsilon_7)
point7
point7 <- as.data.frame(point7)
colnames(point7) = c("ID","beta0_7","beta1_7","time", "epsilon_7")
y_point7 <- point7$beta0_7 + point7$beta1_7*point7$time + point7 $epsilon_7
y_point7
crp7 <- y_point7
head(point7, n = 15)
ggplot(aes(x = tj_gerar, y = crp7), data = point7) +
geom_line(aes(group = ID), color = "gray") +
geom_smooth(aes(group = 1), method = "lm", size = 3, color = "red", se = FALSE) +
theme_bw()
But none of these worked :(
I...
2017 Jul 31
0
Superscript and subscrib R for legend x-axis and y-axis and colour different subjects in longitudinal data with different colours
...with different colours
>>>
>>>
>>>> Hi Rosa > something like
>>>
>>>> plot(1,1, sub=expression(lambda^"2"))
>>>
>>>> So with your example, do you want something like
>>>
>>>> plot(c(1:5), CRP7raw[1,], type = "n", xlim=c(1,5),
>>> ylim=c(-10,5) , > xlab="Day in ICU", > ylab="CRP
>>> (mg/dL)", > sub = mtext(expression(lambda^2)))
>>>
>>> OOps! Either plot( ..., sub = *) or plot( ... ) ;
>>> mtext(*)
>&...
2017 Jul 19
0
spaghetti plot - urgent
...> point7 <- as.data.frame(point7)
>
> colnames(point7) = c("ID","beta0_7","beta1_7","time", "epsilon_7")
>
>
>
>
>
> y_point7 <- point7$beta0_7 + point7$beta1_7*point7$time + point7 $epsilon_7
> y_point7
>
> crp7 <- y_point7
>
> head(point7, n = 15)
>
>
> ggplot(aes(x = tj_gerar, y = crp7), data = point7) +
> geom_line(aes(group = ID), color = "gray") +
> geom_smooth(aes(group = 1), method = "lm", size = 3, color = "red", se =
> FALSE) +
> th...
2017 Aug 01
0
Superscript and subscrib R for legend x-axis and y-axis and colour different subjects in longitudinal data with different colours
...stood everything I need to do.
Most probably because you did not tell precisely what you really want.
I want to write t_i instead of "Day in ICU? [i subscript for t] and y_ij instead of "CRP (mg/dL)? [ij superscript for y]. The label of the axis? :(
So something like that.
plot(c(1:5), CRP7raw[1,], type = "n", xlim=c(1,5),
ylim=c(-10,5) ,
xlab=expression("t"[i]),
ylab=expression("y"^ij))
mtext(expression(lambda^2))
Cheers
Petr
Can you help me on that task?
Thanks!!!!!
Best,
Rosa Oliveira
On 31 Jul 2017, at 10:28, Martin Maechler <maechler at stat...