-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.Rmd
More file actions
46 lines (35 loc) · 1.58 KB
/
test.Rmd
File metadata and controls
46 lines (35 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
---
title: "R Notebook"
output: html_notebook
---
```{r}
library(growthcurver)
library(ggplot2)
library(tidyverse)
library(dplyr)
library(ggprism)
```
```{r}
df4 <- readxl::read_xlsx("20221018_Ca-TitTest2.xlsx")
df4 <- as.data.frame(df4)
base3 <- ggplot(df4, aes(x = treatment, y = RFU)) +
geom_point(stat = "identity", color = "LimeGreen", size = 3.5) +
geom_errorbar(aes(ymin = RFU + StDev, ymax = RFU - StDev), width = 0.1, color = "LimeGreen") +
labs(title="Ca 2+ Treatment", x="Calcium (nM)", y="Relative Fluorescence Intensity") +
theme_prism(base_size = 14) +
theme(aspect.ratio = 0.8) +
scale_shape_prism() +
# theme(axis.text.x = element_text(angle = 90)) +
scale_y_continuous(limits = c(0,1), guide = "prism_offset")
model.RFU <- SummarizeGrowth(df4$treatment, df4$RFU)
predict(model.RFU$model)
df4.predicted <- data.frame(time = df4$treatment, pred.RFU = predict(model.RFU$model))
```
```{r}
#merge and customize plot, add ggprism style
DR <- base3 + geom_smooth(data=df4.predicted, aes(x = df4$treatment, y=pred.RFU), color="LimeGreen", size = 0.3)
DR
```
Add a new chunk by clicking the *Insert Chunk* button on the toolbar or by pressing *Cmd+Option+I*.
When you save the notebook, an HTML file containing the code and output will be saved alongside it (click the *Preview* button or press *Cmd+Shift+K* to preview the HTML file).
The preview shows you a rendered HTML copy of the contents of the editor. Consequently, unlike *Knit*, *Preview* does not run any R code chunks. Instead, the output of the chunk when it was last run in the editor is displayed.