`geom_line()`: Each group consists of only one observation.
ℹ Do you need to adjust the group aesthetic?
`geom_line()`: Each group consists of only one observation.
ℹ Do you need to adjust the group aesthetic?
`geom_line()`: Each group consists of only one observation.
ℹ Do you need to adjust the group aesthetic?
`geom_line()`: Each group consists of only one observation.
ℹ Do you need to adjust the group aesthetic?
`geom_line()`: Each group consists of only one observation.
ℹ Do you need to adjust the group aesthetic?
`geom_line()`: Each group consists of only one observation.
ℹ Do you need to adjust the group aesthetic?
`geom_line()`: Each group consists of only one observation.
ℹ Do you need to adjust the group aesthetic?
`geom_line()`: Each group consists of only one observation.
ℹ Do you need to adjust the group aesthetic?
`geom_line()`: Each group consists of only one observation.
ℹ Do you need to adjust the group aesthetic?
`geom_line()`: Each group consists of only one observation.
ℹ Do you need to adjust the group aesthetic?
`geom_line()`: Each group consists of only one observation.
ℹ Do you need to adjust the group aesthetic?
`geom_line()`: Each group consists of only one observation.
ℹ Do you need to adjust the group aesthetic?
EC50 com pacote DRM
library(drc)
Warning: package 'drc' was built under R version 4.2.3
Carregando pacotes exigidos: MASS
Warning: package 'MASS' was built under R version 4.2.3
Attaching package: 'MASS'
The following object is masked from 'package:dplyr':
select
'drc' has been loaded.
Please cite R and 'drc' if used for a publication,
for references type 'citation()' and 'citation('drc')'.
Attaching package: 'drc'
The following objects are masked from 'package:stats':
gaussian, getInitial
drc1 <-drm(GC_mean ~ Dose, data = FGT152,fct =LL.3())AIC(drc1)
Warning: package 'ec50estimator' was built under R version 4.2.3
df_ec50 <-estimate_EC50(GC_mean ~ Dose,data = dat2,isolate_col ="Code",interval ="delta",fct = drc::LL.3())## Função criada pelo Chadf_ED50 <-function(formula, isolate_col, fct =LL.3(), ed_perc =50, interval ="delta", data) {# get the unique values of the isolate column isolates <-unique(data %>%pull(isolate_col))# apply drm() and ED() to each isolate quiet_map <-quietly(map_df) results <-quiet_map( isolates, ~{# subset the data for the current isolate isolate_data <- data %>%filter(!!sym(isolate_col) == .x)# apply drm() drm_result <-drm(formula, data = isolate_data, fct = fct)# apply ED() and extract the EC50 value and its confidence interval ed_result <-as.data.frame(ED(drm_result, ed_perc, interval = interval))# return as a data frametibble(isolate = .x,EC50 = ed_result["e:1:50", "Estimate"],lower = ed_result["e:1:50", "Lower"],upper = ed_result["e:1:50", "Upper"] ) } )$resultreturn(results)}results <-df_ED50(GC_mean ~ Dose, isolate_col ="Code", data = dat2)# print the resultsresults