collecting data for chi squared test

조회 수: 3 (최근 30일)
Christos Papagrigoriou
Christos Papagrigoriou 2022년 4월 29일
답변: Voss 2022년 4월 30일
Hello,
I have this data. I import it into matlab and and I need to fill that table out. Can you please give me a hint on how to fill it in a time efficient manner.
  댓글 수: 2
Rik
Rik 2022년 4월 29일
If you post the non-efficient code, we can help you optimize it.
Christos Papagrigoriou
Christos Papagrigoriou 2022년 4월 30일
Hello,
table1 = (strcmp(NSCLCR01RadiogenomicDATALABEL.KrasMutation, 'Mutant') & strcmp(NSCLCR01RadiogenomicDATALABEL.SmokingStatus, 'Current'), :);
It turns back a hollow table 0x17

댓글을 달려면 로그인하십시오.

채택된 답변

Voss
Voss 2022년 4월 30일
C = readcell('NSCLCR01Radiogenomic_DATA_LABEL.xlsx');
C(:,[4 6 8 10 18:end]) = [];
headers = C(1,:);
C(1,:) = [];
t = cell2table(C,'VariableNames',headers)
t = 210×13 table
Case ID Patient affiliation Age at Histological Diagnosis Gender Smoking status Histology EGFR mutation status KRAS mutation status ALK translocation status Adjuvant Treatment Chemotherapy Radiation Recurrence ___________ ___________________ _____________________________ __________ ______________ __________________ ____________________ ____________________ ________________________ __________________ ____________ _________ __________ {'AMC-001'} {'Stanford'} 34 {'Male' } {'Nonsmoker'} {'Adenocarcinoma'} {'Wildtype' } {'Mutant' } {'Wildtype' } {'No' } {'No' } {'No'} {'yes'} {'AMC-002'} {'Stanford'} 33 {'Female'} {'Nonsmoker'} {'Adenocarcinoma'} {'Wildtype' } {'Wildtype' } {'Not collected'} {'No' } {'No' } {'No'} {'no' } {'AMC-003'} {'Stanford'} 69 {'Female'} {'Nonsmoker'} {'Adenocarcinoma'} {'Mutant' } {'Wildtype' } {'Wildtype' } {'No' } {'No' } {'No'} {'no' } {'AMC-004'} {'Stanford'} 80 {'Female'} {'Nonsmoker'} {'Adenocarcinoma'} {'Wildtype' } {'Wildtype' } {'Wildtype' } {'No' } {'No' } {'No'} {'no' } {'AMC-005'} {'Stanford'} 76 {'Male' } {'Former' } {'Adenocarcinoma'} {'Mutant' } {'Wildtype' } {'Wildtype' } {'No' } {'No' } {'No'} {'yes'} {'AMC-006'} {'Stanford'} 80 {'Female'} {'Former' } {'Adenocarcinoma'} {'Wildtype' } {'Not collected'} {'Not collected'} {'No' } {'No' } {'No'} {'no' } {'AMC-007'} {'Stanford'} 56 {'Female'} {'Nonsmoker'} {'Adenocarcinoma'} {'Wildtype' } {'Wildtype' } {'Not collected'} {'No' } {'No' } {'No'} {'no' } {'AMC-008'} {'Stanford'} 65 {'Female'} {'Former' } {'Adenocarcinoma'} {'Not collected'} {'Mutant' } {'Not collected'} {'No' } {'No' } {'No'} {'no' } {'AMC-009'} {'Stanford'} 61 {'Male' } {'Former' } {'Adenocarcinoma'} {'Wildtype' } {'Mutant' } {'Wildtype' } {'No' } {'No' } {'No'} {'no' } {'AMC-010'} {'Stanford'} 42 {'Female'} {'Nonsmoker'} {'Adenocarcinoma'} {'Mutant' } {'Wildtype' } {'Wildtype' } {'No' } {'No' } {'No'} {'no' } {'AMC-011'} {'Stanford'} 66 {'Female'} {'Former' } {'Adenocarcinoma'} {'Wildtype' } {'Mutant' } {'Wildtype' } {'Yes'} {'Yes'} {'No'} {'yes'} {'AMC-012'} {'Stanford'} 70 {'Female'} {'Nonsmoker'} {'Adenocarcinoma'} {'Mutant' } {'Wildtype' } {'Wildtype' } {'No' } {'No' } {'No'} {'yes'} {'AMC-013'} {'Stanford'} 67 {'Female'} {'Nonsmoker'} {'Adenocarcinoma'} {'Mutant' } {'Wildtype' } {'Wildtype' } {'No' } {'No' } {'No'} {'no' } {'AMC-014'} {'Stanford'} 78 {'Female'} {'Former' } {'Adenocarcinoma'} {'Wildtype' } {'Wildtype' } {'Wildtype' } {'No' } {'No' } {'No'} {'no' } {'AMC-015'} {'Stanford'} 58 {'Male' } {'Former' } {'Adenocarcinoma'} {'Wildtype' } {'Mutant' } {'Not collected'} {'No' } {'No' } {'No'} {'no' } {'AMC-016'} {'Stanford'} 65 {'Male' } {'Former' } {'Adenocarcinoma'} {'Wildtype' } {'Wildtype' } {'Wildtype' } {'No' } {'No' } {'No'} {'no' }
t_mutant_smokers = t(strcmp(t{:,'KRAS mutation status'},'Mutant') & strcmp(t{:,'Smoking status'},'Current'),:)
t_mutant_smokers = 8×13 table
Case ID Patient affiliation Age at Histological Diagnosis Gender Smoking status Histology EGFR mutation status KRAS mutation status ALK translocation status Adjuvant Treatment Chemotherapy Radiation Recurrence ___________ ___________________ _____________________________ __________ ______________ __________________ ____________________ ____________________ ________________________ __________________ ____________ _________ __________ {'R01-003'} {'VA' } 65 {'Male' } {'Current'} {'Adenocarcinoma'} {'Mutant' } {'Mutant'} {'Wildtype'} {'No' } {'No' } {'No' } {'no' } {'R01-024'} {'VA' } 52 {'Male' } {'Current'} {'Adenocarcinoma'} {'Unknown' } {'Mutant'} {'Unknown' } {'No' } {'No' } {'No' } {'yes'} {'R01-053'} {'VA' } 62 {'Male' } {'Current'} {'Adenocarcinoma'} {'Wildtype'} {'Mutant'} {'Wildtype'} {'No' } {'No' } {'No' } {'no' } {'R01-054'} {'VA' } 56 {'Male' } {'Current'} {'Adenocarcinoma'} {'Wildtype'} {'Mutant'} {'Wildtype'} {'Yes'} {'Yes'} {'Yes'} {'yes'} {'R01-095'} {'VA' } 74 {'Male' } {'Current'} {'Adenocarcinoma'} {'Wildtype'} {'Mutant'} {'Wildtype'} {'No' } {'No' } {'No' } {'no' } {'R01-097'} {'VA' } 70 {'Male' } {'Current'} {'Adenocarcinoma'} {'Wildtype'} {'Mutant'} {'Wildtype'} {'No' } {'No' } {'No' } {'no' } {'R01-116'} {'VA' } 54 {'Male' } {'Current'} {'Adenocarcinoma'} {'Wildtype'} {'Mutant'} {'Wildtype'} {'No' } {'No' } {'No' } {'no' } {'R01-137'} {'Stanford'} 50 {'Female'} {'Current'} {'Adenocarcinoma'} {'Wildtype'} {'Mutant'} {'Wildtype'} {'No' } {'No' } {'No' } {'no' }

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Mathematics and Optimization에 대해 자세히 알아보기

태그

제품


릴리스

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by