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

최명기 연구 과제 #3

Closed shanmdphd closed 4 years ago

shanmdphd commented 4 years ago

@mante111 선생님

  1. 아무 Rmarkdown 문서를 만들고
  2. html 파일을 생성하여,
  3. https://github.com/pipetcpt/interns/tree/master/2020-homework 에 Rmd와 html 파일을 올려주세요. (기한 2019-12-27)

참고링크

  1. https://tariat.tistory.com/663
  2. https://github.com/pipetcpt/interns/tree/master/2019-homework
shanmdphd commented 4 years ago
  1. https://github.com/pipetcpt/interns/tree/master/docs-presentation 의 R과 그 패키지와 관련된 이론을 습득하고 실습해 보십시오.
  2. 그 후에 https://github.com/pipetcpt/interns/tree/master/2019-homework.Rmd 에 대하여 .html로 변환하면서 그 의미를 파악하십시오.
shanmdphd commented 4 years ago

선생님이 이제 R이 익숙해졌으므로 본격적으로 약리학에 응용할 수 있을 것입니다. 아래 자료를 참고해서 비구획분석을 R로 수행해보세요.

의문사항이 생기면 2-3개 모아서 아래에 댓글로 남겨주세요.

mante111 commented 4 years ago
  1. tblNCA에서 iAUC랑 R2ADJ항을 넣으면 오류가뜨는데 왜 그런지 모르겠습니다.
  2. NonCompart에 여러가지 함수가 있다고했는데 글에서는 AUC만 설명되어있는데 이것만 알면 되나요??
  3. tibble이라는 명령어가 어떤건지 잘모르겠습니다.
shanmdphd commented 4 years ago

https://github.com/asancpt/book-ncar/issues/4 에 답변 확인하십시오.

shanmdphd commented 4 years ago

선생님 언제까지 나오시게 되는 건가요? 논문을 한편 드릴테니 읽고 마지막 날에 발표하는 시간을 가졌으면 합니다.

또한 임상시험 자료를 전자화해서 자료 분석하는 업무를 했으면 좋겠습니다.

mante111 commented 4 years ago

네네 논문이랑 임상시험 자료 주시면 한번 해보겠습니다.

배울수 있는게 남아있다면 2월까지 나올 생각입니다,

shanmdphd commented 4 years ago

연구 과제 방법

data-raw/assay 의 자료로 R을 사용하여

  1. 그림을 그려보고, (모두 모아서 / 개인별로 / GENE 별로)
  2. NCA 분석 수행해보고,
  3. CMAX, AUClast파라메터 값에 대해 ANOVA를 통해 GENE에 따라 차이가 있는지 파악해 보세요.

각각 파일을 figure.R, NCA.R, stat.R로 저장하세요.

그림예시

그룹별 그림의 예시

결과

  1. Rmarkdown 문서(mante111.Rmd)를 생성하여 html 파일을 만들고,
  2. 그 결과를 1월 13일 오전 10시 회의에서 공유해 보세요.
shanmdphd commented 4 years ago

과제 관련된 질문은 이곳에 해 주시고, 작업한 R 파일을 저장해서 아래 위치에 올려주세요.

https://github.com/pipetcpt/interns/tree/master/2020-homework

mante111 commented 4 years ago

1. 주어진 자료에 성별항목이 없어 T-test를 할수가 없습니다.

2. 주어진 자료에서 gene가 의미하는 것을 모르겠습니다.

3. 아래의 두 코드가 오류가 납니다.

PK_data <- read_excel("Drug_X_PK.xlsx")
plotPK(PK_data, "ID", "TIME", "DV", unitConc = "ug/L", unitTime = "h")
PK_data <- read_excel("Drug_X_PK.xlsx")
NCA <- tblNCA(PK_data, "ID", "TIME", "DV", doseUnit = "mg", timeUnit = "h", concUnit = "ug/L")
shanmdphd commented 4 years ago
  1. Gene을 독립변수로 하여 ANOVA를 수행하세요.
shanmdphd commented 4 years ago
  1. PK_data <- read_excel("Drug_X_PK.xlsx") %>% as.data.frame() 으로 해보세요.
shanmdphd commented 4 years ago

특정 ID 자료를 뺴는 법

PK_data %>%
  filter(ID != 번호) # 번호는 숫자이거나 문자일 수 있음. 문자일 경우 "" 사용
mante111 commented 4 years ago
  1. plotPK에서 이상한자료가 10번이길래 그거 찾아서 빼고 했는데도 똑같은 오류가 납니다. 그래서 각 ID별로 plotPK를 돌려봤는데 10번 외에는 잘 됬던거 같습니다. 어떤것이 문제 인지 모르겠습니다.

  2. 아래 두코드가 똑같은거 같은데 왜 첫번째 코드는 오류가 나는지 잘모르겠습니다.

    • 첫번쩨 코드
      plotPK(PK_data %>% filter(ID == 1), "ID", "TIME", "DV", unitConc = "ug/L", unitTime = "h")
    • 두번째코드
      PK<- PK_data %>% filter(ID == 1)
      plotPK(PK, "ID", "TIME", "DV", unitConc = "ug/L", unitTime = "h")
shanmdphd commented 4 years ago

네 선생님, 이와 관련된 질문은 이 곳에 달아주세요. plotPK는 오류가 나니 사용하지 마시고 진행해주세요. ggplot2로 진행해보세요.

mante111 commented 4 years ago
  1. 주신 첫번째 과제에서 개인별로 그림을 그리려고 하는데 개인의 숫자가 너무 많아 for문을 사용하려고 하는데 어느 문법에 맞춰서 for문을 작성해야하나요??
shanmdphd commented 4 years ago
mante111 commented 4 years ago
mante111 commented 4 years ago
  1. ggplot으로 plotting을 했고 정상처리 됬는데 plot창에 plot이 뜨지 않습니다. 2, 아래의 코드가 작동이 되지 않습니다.
    PK <- read_excel("CPT2019-02-CRF-data.xlsx", sheet = 11)
    tblNCA(PK, "등록번호", "시험시간", "virtual_conc", doseUnit = "mg", timeUnit = "h", concUnit = "ug/L", R2ADJ = 0.01)
  2. 투약시간이 1H 이런 형태로 되어있는데 이것을 숫자형 데이터로 바꿀 방법이 궁금합니다.
  3. filter함수에서 아래와 같은 오류가 계속 뜹니다.
    Error in UseMethod("filter_") : 
    클래스 "NULL"의 객체에 적용된 'filter_'에 사용할수 있는 메소드가 없습니다
shanmdphd commented 4 years ago
  1. 코드 전체를 올려주세요.
  2. as.data.frame(PK) 처리하세요.
  3. sub('H', '', time) 후 as.numeric()
  4. 코드 전체를 올려주세요.
mante111 commented 4 years ago
  1. 아래의 코드가 안됩니다.
    PK_day2 <- read_excel("CPT2019-02-CRF-data.xlsx", sheet = 11) %>% as.data.frame() %>% filter(방문 == "Day 2") %>% sub('H', '', 시험시간)
  2. 앞에서 질문한 2번코드는 as.data.frame(PK)를 했을때도 작동하지 않았습니다.
shanmdphd commented 4 years ago

일단 한글로 된 column name은 R에서 처리가 쉽지 않습니다. Excel에서 영어로 바꾸고 해보세요.