Skip to content

Commit

Permalink
Merge pull request #86 from carpentries-incubator/fix-challenge
Browse files Browse the repository at this point in the history
Fix subsetting challenge
  • Loading branch information
csoneson authored Sep 23, 2023
2 parents 0979450 + f6404a7 commit 7078373
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions episodes/03-import-annotate.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,8 @@ of expression levels for infected and non-infected samples based on these genes.
table(se$infection)
# 2
se_infected <- se[se$infection == "InfluenzaA", ]
se_noninfected <- se[se$infection == "NonInfected", ]
se_infected <- se[, se$infection == "InfluenzaA"]
se_noninfected <- se[, se$infection == "NonInfected"]
means_infected <- rowMeans(assay(se_infected)[1:500, ])
means_noninfected <- rowMeans(assay(se_noninfected)[1:500, ])
Expand All @@ -291,7 +291,7 @@ summary(means_infected)
summary(means_noninfected)
# 3
ncol(se[se$sex == "Female" & se$infection == "InfluenzaA" & se$time == "Day8", ])
ncol(se[, se$sex == "Female" & se$infection == "InfluenzaA" & se$time == "Day8"])
```

:::::::::::::::::::::::::::::::::::
Expand Down

0 comments on commit 7078373

Please sign in to comment.