Param0 <- subtrt3 %>% arrange(trtpn) %>% groupby(trtpn) %>% mutate(CL0 =as.numeric(CL),…
Jump to turn (6)
- 1Param0 % arrange(trtpn) %>% groupby(trtpn) %>% mutate(CL0 =as.numeric(CL), V0 =
- 2how to achieve when KA==0 & f==0 then select CL, V ,otherwise will select the CL
- 3Param2 % filter(KA != 0 & f !=0)%>% select(CL,V,KA,f)%>% bindrow(Param1) how to
- 4type <- (unique(trt$Type)) how to fix this code and make the type based on trtpn
- 5if trtpn=1 then TYPE="Oral" and trtpn=2 then TYPE="infusion" , trtpn=3 then Type
- 6how to develop Type[[i]] I standards for different TRTPN VALUE
- User
Param0 <- sub_trt3 %>% arrange(trtpn) %>% group_by(trtpn) %>%
mutate(CL0 =as.numeric(CL), V0 = as.numeric(V), KA0 =ifelse(KA != "NA", as.numeric(KA), 0), f0 = ifelse(f != "NA", as.numeric(f), 0)) %>% summarise(CL0 = unique(CL0), V0 = unique(V0),KA0=unique(KA0),f0=unique(f0)) %>% mutate(CL = CL0, V = V0,KA = KA0,f = f0) %>% filter(ifelse(KA == 0 & f == 0),select(CL,V),select(CL,V,KA,f)) how to fix this code
- Assistant
To fix the code, you can remove the unnecessary part of the filter statement and update the select statements. Here's the corrected code:
code