https://github.com/moodymudskipper/datasearch
Find Datasets Observing Specific Conditions
https://github.com/moodymudskipper/datasearch
Last synced: 2 days ago
JSON representation
Find Datasets Observing Specific Conditions
- Host: GitHub
- URL: https://github.com/moodymudskipper/datasearch
- Owner: moodymudskipper
- Created: 2020-11-05T13:20:37.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-11-05T13:42:14.000Z (over 4 years ago)
- Last Synced: 2025-04-12T20:52:12.573Z (2 days ago)
- Language: R
- Size: 4.34 MB
- Stars: 13
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
Awesome Lists containing this project
- jimsghstars - moodymudskipper/datasearch - Find Datasets Observing Specific Conditions (R)
README
---
output: github_document
---```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```# datasearch
*{datasearch}* is a one function package that can be used to find datasets
observing specific conditions, either in a specific package,
a list of packages, or all installed packages.## Installation
Install with:
``` r
remotes::install_github("moodymudskipper/datasearch")
```## Examples
```{r, eval = FALSE}
library(datasearch)#~~~~~~~~~~~~~ all data sets from package "dplyr" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dplyr_all <-
datasearch("dplyr")View(dplyr_all)
```
```{r, eval = FALSE}
#~~~~~~~~~~~~~ datasets from package "datasets" restricted by condition ~~~~~~~~datasets_ncol5 <-
datasearch("datasets", filter = ~is.data.frame(.) && ncol(.) == 5)View(datasets_ncol5)
```
```{r, eval = FALSE}
#~~~~~~~~~~~~~ all datasets from all installed packages, no restriction ~~~~~~~~# might take more or less time, depends what you have installed
all_datasets <- datasearch()View(all_datasets)
# subsetting the output
my_subset <- subset(
all_datasets,
class1 == "data.frame" &
grepl("treatment", names_collapsed) &
nrow < 100
)View(my_subset)
```