get_cluster_recommendations.Rd
Get recommendations prescribed by doctors to patients from given clusters. The categories of recommendation terms can be specified.
get_cluster_recommendations(recom_descriptions, clusters, category = "all", recom_table)
recom_descriptions | A vector of descriptions of recommendations, named by visits' IDs; terms in the descriptions are separated by ", " |
---|---|
clusters | An output of the function cluster_visits |
category | A vector of categories of the terms to be returned or |
recom_table | (necessary if
|
A list of data frames. For each cluster there is a data frame with columns:
recommendation
A term of recommendation
count
A number of occurrences of the recommentadion in the cluster
frequency
A percentage of visits containing the reccomentation
#> Error in .subset2(public_bind_env, "initialize")(...): unused arguments (word_vectors_size = 10, vocabulary = list(c("fever", "rhinitis", "cough", "eye", "thyroid"), c(3, 3, 4, 4, 6), c(3, 3, 4, 4, 6)))#> Error in .subset2(public_bind_env, "initialize")(...): unused arguments (word_vectors_size = 10, vocabulary = list(c("fever", "man", "mother", "cough", "heart", "patient", "thyroid", "eye", "rhinitis", "woman", "father"), c(2, 2, 2, 3, 3, 3, 3, 4, 5, 6, 7), c(2, 2, 2, 3, 3, 3, 3, 4, 5, 6, 7)))visits_vectors <- embed_list_visits(interviews, examinations, inter_term_vectors, exam_term_vectors)#> Error in ncol(term_vectors): object 'inter_term_vectors' not found#> Error in rownames(visits_vectors): object 'visits_vectors' not foundget_cluster_recommendations(recommendations, clusters, recom_table = terms_categories)#> Error in nrow(clusters$centers): object 'clusters' not foundget_cluster_recommendations(recommendations, clusters, recom_table = terms_categories, category = "anatomic")#> Error in nrow(clusters$centers): object 'clusters' not foundget_cluster_recommendations(recommendations, clusters, recom_table = terms_categories, category = "all")#> Error in nrow(clusters$centers): object 'clusters' not found