У меня есть набор данных с 469 столбцами и 1107 наблюдениями.
Я хотел бы разделить фрейм данных на более мелкие фреймы данных для каждой группы неблагоприятных событий. Другими словами, все имена столбцов, которые имеют «эндокринный», будут в одном фрейме данных, все имена столбцов с «blood_lymphati c» будут в другом фрейме данных.
Ниже показаны первые 54 имени столбца во фрейме данных.
Заранее спасибо!
head(df)
[1]"rc_id" "dlt_1"
[3] "soc_1" "ae_blood_lymphatic_1"
[5] "ae_endocrine_1" "ae_gastrointestinal_1"
[7] "ae_general_admin_site_condition_1" "ae_infections_infestations_1"
[9] "ae_investigations_1" "ae_metabolism_nutrition_1"
[11] "ae_musculoskeletal_connect_tissue_1" "ae_psychiatric_1"
[13] "ae_skin_subcutaneous_tissue_1" "ae_2"
[15] "dlt_2" "soc_2"
[17] "ae_blood_lymphatic_2" "ae_cardiac_2"
[19] "ae_eye_2" "ae_gastrointestinal_2"
[21] "ae_general_admin_site_condition_2" "ae_infections_infestations_2"
[23] "ae_injury_poison_proce_complic_2" "ae_metabolism_nutrition_2"
[25] "ae_musculoskeletal_connect_tissue_2" "ae_psychiatric_2"
[27] "ae_renal_uninary_2" "ae_respiratory_thoracic_mediastinal_2"
[29] "ae_skin_subcutaneous_tissue_2" "ae_social_circumstances_2"
[31] "ae_vascular_2" "ae_3"
[33] "dlt_3" "soc_3"
[35] "ae_blood_lymphatic_3" "ae_gastrointestinal_3"
[37] "ae_general_admin_site_condition_3" "ae_investigations_3"
[39] "ae_metabolism_nutrition_3" "ae_nervous_system_3"
[41] "ae_renal_uninary_3" "ae_respiratory_thoracic_mediastinal_3"
[43] "ae_4" "dlt_4"
[45] "soc_4" "ae_blood_lymphatic_4"
[47] "ae_gastrointestinal_4" "ae_general_admin_site_condition_4"
[49] "ae_infections_infestations_4" "ae_investigations_4"
[51] "ae_metabolism_nutrition_4" "ae_musculoskeletal_connect_tissue_4"
[53] "ae_psychiatric_4" "ae_respiratory_thoracic_mediastinal_4"