pipetcpt / trainees

PIPET 수련생을 위한 실습교육자료입니다. (R, NCA, Rmarkdown, data science, 임상시험, 약동학/약력학, 논문발표 등)
https://github.com/pipetcpt/trainees/wiki
GNU General Public License v3.0
22 stars 9 forks source link

Verapamil / Moxifloxacin PK model #6

Closed shanmdphd closed 4 years ago

shanmdphd commented 4 years ago

@mante111 님,

Verapamil / Moxifloxacin PK model 을 찾아보세요.

mante111 commented 4 years ago
mante111 commented 4 years ago
  1. 띄워쓰기가 들어간 변수값은 R에서 어떻게 처리해야 하나요??
  2. 특정 범위의 행의 값을 바꾸고 싶은 경우 쓸수 있는 명령어가 있나요??
  3. 행이나 열을 지울수 있는 명령어가 있나요??
mante111 commented 4 years ago

아래 코드 작성시

경고메시지(들): 
In sub(., "H", "", time) :
  인자 'pattern'는 반드시 길이가 1 보다 커야 하고, 오로지 첫번째 요소만이 사용될 것입니다

이라는 오류가 뜹니다

Atime <- read_excel("C:/mante111/R/CRF NCA 분석 데이터 만들기/atime.xlsx") %>%
  mutate(atime = ymd_hm(`atime`)) %>% 
  mutate(LastDosingTime =  ymd_hm(LastDosingTime)) %>% 
  mutate(dif = difftime(atime, LastDosingTime, units = "hours")) %>% 
  mutate(dif_ifelse= ifelse(dif < 0, 0, dif)) %>% 
  sub("H", '', time)
shanmdphd commented 4 years ago
Atime <- read_excel("C:/mante111/R/CRF NCA 분석 데이터 만들기/atime.xlsx") %>% # CHECK: 영어 폴더이름 쓰세요.
  mutate(atime = ymd_hm(`atime`)) %>% 
  mutate(LastDosingTime =  ymd_hm(LastDosingTime)) %>% 
  mutate(dif = difftime(atime, LastDosingTime, units = "hours")) %>% 
  mutate(dif_ifelse= ifelse(dif < 0, 0, dif)) %>% 
  mutate(time = sub("H", '', time)) # CHECK: 이부분 수정하세요.