Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

mesh bug fixes and README edits

  • Loading branch information...
commit 9f2881fe4f7f410398ab533b7effc79bd04ed16d 1 parent 53cba15
@DASpringate DASpringate authored
View
4 R/rpubmed_mesh.R
@@ -68,8 +68,8 @@ mesh_table <- function(articles){
#' kat <- keyword_assoc_table(corpus = articles, keyword_list = keywords, where = in_mesh_abstract_p)
#' }
keyword_assoc_table <- function(corpus, keyword_list, ...){
- kt <- data.frame(rbind(t(combn(keywords, 2)),
- matrix(rep(keywords, each = 2), ncol= 2, byrow = TRUE)), stringsAsFactors = FALSE)
+ kt <- data.frame(rbind(t(combn(keyword_list, 2)),
+ matrix(rep(keyword_list, each = 2), ncol= 2, byrow = TRUE)), stringsAsFactors = FALSE)
kt$count <- sapply(1:nrow(kt),
function(i){
if(kt[i,1] == kt[i,2]){
View
8 README.md
@@ -6,7 +6,7 @@ Tools for extracting and processing records from Pubmed and Pubmed Central.
This project is still very much in development... Please contact me with any questions, suggestions or bug reports.
-I have built in experimental support for searching and processing [MeSH headings](http://www.nlm.nih.gov/bsd/disted/meshtutorial/introduction/index.html) in the mesh_experimental branch. This will soon be merged into master, making this package of particular use for biomedical researchers conducting systematic reviews and meta-analyses.
+I have built in support for searching and processing [MeSH headings](http://www.nlm.nih.gov/bsd/disted/meshtutorial/introduction/index.html), making this package of particular use for biomedical researchers conducting systematic reviews and meta-analyses. Two of these functions (`mesh_assoc_table` and `keyword_assoc_table`) produce association matrices which can be fed into graph packages such as `igraph` to visualise the associations between different search terms.
@@ -26,6 +26,12 @@ I have built in experimental support for searching and processing [MeSH headings
- `geocode_addresses(addresses, sleeper = 0.33, depth = 3)`
- `get_article_location_data(abstracts)`
- `geocode_address(address, depth = 3)`
+* mesh - Tools for processing and exploring associations between MeSH headings and other keywords
+ - `mesh_assoc_table(corpus)`
+ - `keyword_assoc_table(corpus, keyword_list, ...)`
+ - `get_mesh_headings(article)`
+ - `mesh_heading_frequency(corpus)`
+
View
468,247 Test/PCD_articles.json
151,501 additions, 316,746 deletions not shown
View
2  man/keyword_assoc_table.Rd
@@ -25,7 +25,7 @@
\dontrun{
articles <- fromJSON("Test/PCD_articles.json")
keywords <- c("effectiveness", "treatment outcome", "comorbidity", "risk factor", "incidence")
- kat <- keyword_assoc_table(corpus = articles, eyword_list = keywords, where = in_meah_abstract_p)
+ kat <- keyword_assoc_table(corpus = articles, keyword_list = keywords, where = in_mesh_abstract_p)
}
}
View
6 man/mesh_assoc_table.Rd
@@ -19,12 +19,10 @@
\dontrun{
articles <- fromJSON("Test/PCD_articles.json")
-a = mesh_table(articles)
diab = get_articles_by_terms(articles, list("diabetes", c("case-control")), where= in_mesh_abstract_p)
-diab_tab <- mesh_table(diab)
-diab_assoc <- mesh_assoc_table(diab_tab)
+diab_assoc <- mesh_assoc_table(diab)
# list of MeSH headings with frequencies:
-d <- diag(ccsa)
+d <- diag(diab_assoc)
Pick only those appearing in > 5 articles:
d_5 <- d[d > 5]
Please sign in to comment.
Something went wrong with that request. Please try again.