collecting data for chi squared test

1 回表示 (過去 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 Center および File ExchangeHypothesis Tests についてさらに検索

タグ

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by