Browse Source

Reorder factors

master
Pjotr Prins 6 months ago
parent
commit
3d1b6794bf
1 changed files with 21 additions and 11 deletions
  1. +21
    -11
      doc/04-merge-cytokines.Rmd

+ 21
- 11
doc/04-merge-cytokines.Rmd View File

@@ -5,6 +5,7 @@ date: "11/03/2020"
output: html_document
---


```{r setup, include=FALSE}
# The following sets up the working directory for
# the data files. Make sure to amend it to your
@@ -63,16 +64,25 @@ ggplot(data=c1, aes(Timepoint,IFNa,colour=location)) + geom_point()
Now the time points are not ordered correctly, so let's fix that

```{r}
c2 = c1 %>%
mutate(t = revalue(Timepoint, c("C-1"=0,
"C+5"=5,
"C+7"=7,
"C+9"=9,
"C+14"=14,
"C+21"=21,
"DoD"=30
)))
ggplot(data=c2, aes(t,IFNg,colour=phenotype)) + geom_point()
c1 %>%
mutate(t = revalue(Timepoint, c("C-1"="0",
"C+5"="05",
"C+7"="07",
"C+9"="09",
"C+14"="14",
"C+21"="21",
"DoD"="30"
))) %>%
ggplot(aes(t,IFNg,colour=phenotype)) +
geom_point()
```

Now let's try a linear regression


```{r}
ggplot(c1,aes(phenotype,IFNg,colour=Timepoint)) +
geom_point()
```


Loading…
Cancel
Save