-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
34 changed files
with
642 additions
and
1,820 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
^vignettes$ | ||
^\.buildignore$ | ||
^vignettes/siteonly$ | ||
^cran-comments\.md$ | ||
^CRAN-RELEASE$ | ||
^docs$ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
--- | ||
title: "tor 1.0.0" | ||
output: rmarkdown::html_vignette | ||
vignette: > | ||
%\VignetteIndexEntry{tor 1.0.0} | ||
%\VignetteEngine{knitr::rmarkdown} | ||
%\VignetteEncoding{UTF-8} | ||
--- | ||
|
||
```{r setup, include = FALSE} | ||
knitr::opts_chunk$set( | ||
collapse = TRUE, | ||
comment = "#>" | ||
) | ||
install.packages( | ||
here::here(".buildignore/tor_1.0.0.zip"), | ||
repos = NULL, type = "win.binary" | ||
) | ||
``` | ||
|
||
I'm happy to announce that __tor__ 1.0.0 in now on CRAN! | ||
|
||
__tor__ (to-R) helps you to | ||
read multiple files from a single directory into R, as simply as possible. It makes a frequent task less painful. __tor__ is particularly useful during quick, exploratory data analysis and works well with the [tidyverse](https://www.tidyverse.org/). | ||
|
||
This initial release is minimal. It delivers the most useful functionality with few dependencies. Install the latest version of __tor__ from CRAN with: | ||
|
||
``` | ||
install.packages("tor") | ||
``` | ||
|
||
(Or [install the development version from GitHub](https://maurolepore.github.io/tor/index.html) which includes [exciting new features](https://maurolepore.github.io/tor/news/index.html).) | ||
|
||
--- | ||
|
||
```{r} | ||
library(tor) | ||
``` | ||
|
||
All functions list whatever they read, and default to reading from the working directory. | ||
|
||
`list_csv()` and friends import multiple files from a directory into a list. | ||
|
||
```{r} | ||
dir() | ||
list_csv() | ||
``` | ||
|
||
You may import specific files matching a pattern. | ||
|
||
```{r} | ||
(path_mixed <- tor_example("mixed")) | ||
dir(path_mixed) | ||
list_rdata(path_mixed, regexp = "[.]RData", ignore.case = FALSE) | ||
``` | ||
|
||
`list_any()` is the most flexible function. You supply the function to read with. | ||
|
||
```{r} | ||
(path_csv <- tor_example("csv")) | ||
dir(path_csv) | ||
list_any(path_csv, readr::read_csv) | ||
``` | ||
|
||
It understands lambda functions and formulas (powered by [__rlang__](https://rlang.r-lib.org/)). | ||
|
||
```{r} | ||
# Use the pipe (%>%) | ||
library(magrittr) | ||
(path_rdata <- tor_example("rdata")) | ||
dir(path_rdata) | ||
path_rdata %>% | ||
list_any(function(x) get(load(x))) | ||
# Same | ||
path_rdata %>% | ||
list_any(~get(load(.x))) | ||
``` | ||
|
||
```{r, include=FALSE} | ||
devtools::install_github("maurolepore/tor", upgrade = "never") | ||
``` | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
inst/doc | ||
.Rhistory | ||
.RData | ||
.Rproj.user | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,3 @@ | ||
# tor 1.0.9001 unreleased | ||
# tor 1.0.1.9000 | ||
|
||
## Minor | ||
|
||
* `list_any()`, `list_csv()`, `list_tsv()`, `load_csv()`, and `load_tsv()` now use __readr__. | ||
* This makes reading data faster and safer. | ||
|
||
* Each dataframe output is now converted to tibble. | ||
* Users no longer need to call `tibble::as_tibble()`. | ||
|
||
* New `load_*()` variants load each file in a directory into an environment. | ||
|
||
## Patch | ||
|
||
* File names now emphasize the most common case when users import .csv files. | ||
|
||
* Example data is now named more consistently. For example: | ||
* `dir(tor_example("rds"))` returns `c("rds1.rds", "rds2.rds")`. | ||
* `dir(tor_example("csv"))` returns `c("csv1.csv", "csv2.csv")`. | ||
|
||
* Source is now styled with `styler::style_pkg()` (defaults) | ||
|
||
* Lambda functions in source code now use the more common function(x) syntax. | ||
* Text editors highlight `function()` which makes code easier to read. | ||
|
||
# tor 1.0.0 | ||
|
||
* Initial release. | ||
* Work in progress for the initial release. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.