@@ -46,7 +46,7 @@ plot_MM <- function(
4646 # Fitten des SSmicmen-Modell
4747 groupdata <-
4848 data | >
49- filter(!! sym(group )== groups [group_i ])
49+ filter(!! rlang :: sym(group )== groups [group_i ])
5050 vdata <- groupdata [[velocity ]]
5151 sdata <- groupdata [[substrate ]]
5252 fit <- stats :: nls(vdata ~ SSmicmen(sdata , Vm , K ))
@@ -59,8 +59,8 @@ plot_MM <- function(
5959 predict(fit ,
6060 newdata = list (sdata = linedata $ x ))
6161 refdata <- broom :: tidy(fit ) | >
62- select(term , estimate ) | >
63- pivot_wider(names_from = term ,values_from = estimate ) | >
62+ select(' term' , ' estimate' ) | >
63+ pivot_wider(names_from = ' term' ,values_from = ' estimate' ) | >
6464 mutate(xv = max(sdata , na.rm = T ),
6565 yk = min(vdata , na.rm = T ))
6666 # plotten des Fits
@@ -69,29 +69,28 @@ plot_MM <- function(
6969 mapping = aes(x = .data [[substrate ]],# sdata,
7070 y = .data [[velocity ]]))+
7171 geom_point()+
72- # stat_function(fun = function(sub){ (stats::coef(fit)[[1]] * sub) / ( stats::coef(fit)[[2]] + sub)}, color = "blue")+ # einzeichnen des Fitting
73- geom_line(data = linedata ,aes(x = x , y = y ),
72+ geom_line(data = linedata ,aes(x = .data [[' x' ]], y = .data [[' y' ]]),
7473 color = ' blue' )+
7574 geom_hline(data = refdata ,
76- aes(yintercept = Vm ), linetype = 3 )+ # Vmax from coefficents
75+ aes(yintercept = .data [[ ' Vm ' ]] ), linetype = 3 )+ # Vmax from coefficents
7776 geom_text(data = refdata ,
78- aes(xv , Vm ,
77+ aes(.data [[ ' xv ' ]], .data [[ ' Vm ' ]] ,
7978 label = paste(
8079 ' Vmax =' ,
81- roundR(Vm ))),
82- vjust = 1.4 , hjust = 1 )+ # Vmax aus coefficents eintragen
80+ roundR(.data [[ ' Vm ' ]] ))),
81+ vjust = 1.4 , hjust = 1 )+ # Vmax from coefficents
8382 geom_hline(data = refdata ,
84- aes(yintercept = Vm / 2 ),linetype = 3 )+ # Vmax/2 from coefficents
83+ aes(yintercept = .data [[ ' Vm ' ]] / 2 ),linetype = 3 )+ # Vmax/2 from coefficents
8584 geom_text(data = refdata ,
86- aes(xv , Vm / 2 ),
85+ aes(.data [[ ' xv ' ]], .data [[ ' Vm ' ]] / 2 ),
8786 label = " Vmax/2" , vjust = - 0.8 , hjust = 1 )+
8887 geom_vline(data = refdata ,
89- aes(xintercept = K ), linetype = 2 )+ # Km from coefficents
88+ aes(xintercept = .data [[ ' K ' ]] ), linetype = 2 )+ # Km from coefficents
9089 geom_text(data = refdata ,
91- aes(K , yk ,
90+ aes(.data [[ ' K ' ]], .data [[ ' yk ' ]] ,
9291 label = paste(
9392 ' K =' ,
94- roundR(K ))),
93+ roundR(.data [[ ' K ' ]] ))),
9594 vjust = .5 , hjust = - 0.1 )+
9695 scale_x_continuous(n.breaks = 10 )+
9796 xlab(xlab )+
0 commit comments