https://github.com/sgibb/sgtools
miscellaneous R functions
https://github.com/sgibb/sgtools
Last synced: about 1 month ago
JSON representation
miscellaneous R functions
- Host: GitHub
- URL: https://github.com/sgibb/sgtools
- Owner: sgibb
- License: gpl-3.0
- Created: 2012-06-11T20:34:21.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2013-03-26T12:18:46.000Z (about 12 years ago)
- Last Synced: 2025-02-14T12:40:51.099Z (3 months ago)
- Language: R
- Size: 230 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# install
```R
install.packages("devtools")
library("devtools")
install_github("sgtools", "sgibb")
```# fetchArxiv
fetches query counts from arxiv database grouped by years
example:
```R
library("sgtools")
bayes <- fetchArxiv("cat:stat.AP AND abs:Bayes", 2009, 2010)
bayes
# year counts
#[1,] 2009 4
#[2,] 2010 13
```# fetchPubmed
fetches query counts from pubmed database grouped by years
Thanks to Kristoffer Magnusson for providing this nice article:
[An R Script to Automatically download PubMed Citation Counts By Year of
Publication](http://rpsychologist.com/an-r-script-to-automatically-look-at-pubmed-citation-counts-by-year-of-publication/)example:
```R
library("sgtools")
ms <- fetchPubmed("Mass Spectrometry[MeSH]", 2009, 2010)
ms
# year counts
#[1,] 2009 10829
#[2,] 2010 11143total <- fetchPubmed("", 1975, 2011);
barplot(total[, "counts"], names.arg=as.character(total[, "year"]),
main="total number of publications in pubmed", col="#7FC97F")
```
# multipleHist
computes histogram for a list of data
example:
```R
library("sgtools")
x <- lapply(c(1, 1.1, 4), rnorm, n=1000)
multipleHist(x)
```
