Skip to content

Commit

Permalink
updated on 2019-01-13 21:32:22
Browse files Browse the repository at this point in the history
  • Loading branch information
sbalci committed Jan 13, 2019
1 parent 6b79089 commit ef8649e
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 19 deletions.
Binary file modified .DS_Store
Binary file not shown.
20 changes: 16 additions & 4 deletions PathologyArticlesFromTurkeyComparedtoAllPublishedArticles.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ repeat {
myTerm <- rstudioapi::terminalCreate(show = FALSE)
rstudioapi::terminalSend(
myTerm,
"xtract -input data/pubmed_result_TurkPath.xml -pattern PubmedArticle -element MedlineCitation/PMID -block ArticleId -if ArticleId@IdType -equals doi -element ArticleId > data/pubmed_result_TurkPath.txt \n"
"xtract -input data/pubmed_result_TurkPath.xml -pattern PubmedArticle -block ArticleId -if ArticleId@IdType -equals doi -element ArticleId > data/pubmed_result_TurkPath_doi.txt \n"
)
Sys.sleep(1)
repeat {
Expand All @@ -106,12 +106,24 @@ break

```{r}
library(tidyverse)
pubmed_result_TurkPath <- read_csv(file = "data/pubmed_result_TurkPath.csv")
pubmed_result_TurkPath_doi <- pubmed_result_TurkPath_doi$V2
pubmed_result_TurkPath_doi <- read.delim("data/pubmed_result_TurkPath_doi.txt", header = FALSE)
```


```{r}
write(pubmed_result_TurkPath_doi, "data/pubmed_result_TurkPath_doi.txt")
pubmed_result_TurkPath_doi$V1[grep("^10.", pubmed_result_TurkPath_doi$V1)]
pubmed_result_TurkPath_doi$V2 <- grepl(
pattern = "^10.",
x = pubmed_result_TurkPath_doi$V1
)
pubmed_result_TurkPath_doi2 <- pubmed_result_TurkPath_doi %>%
filter(pubmed_result_TurkPath_doi$V2 == TRUE) %>%
select(V1)
write_csv(pubmed_result_TurkPath_doi2, "data/pubmed_result_TurkPath_doi2.txt", col_names = FALSE)
```

32 changes: 17 additions & 15 deletions PathologyArticlesFromTurkeyComparedtoAllPublishedArticles.nb.html

Large diffs are not rendered by default.

0 comments on commit ef8649e

Please sign in to comment.