Add chapter status

This commit is contained in:
Hadley Wickham 2021-05-04 08:10:39 -05:00
parent 3a45ea5fc5
commit 8efc22598b
16 changed files with 78 additions and 1 deletions

View File

@ -19,3 +19,20 @@ options(
pillar.bold = TRUE, pillar.bold = TRUE,
stringr.html = FALSE stringr.html = FALSE
) )
status <- function(type) {
status <- switch(type,
restructuring = "undergoing heavy restructuring and may be confusing or incomplete",
drafting = "currently a dumping ground for ideas, and we don't recommend reading it",
stop("Invalid `type`", call. = FALSE)
)
cat(paste0(
"::: {.rmdnote}\n",
"You are reading the work-in-progress second edition of R for Data Science. ",
"This chapter is currently ", status, ". ",
"You can find the polished first edition at <https://r4ds.had.co.nz>.\n",
":::\n"
))
}

View File

@ -1,5 +1,9 @@
# Column-wise operations {#column-wise} # Column-wise operations {#column-wise}
```{r, results = "asis", echo = FALSE}
status("drafting")
```
## Introduction ## Introduction
<!--# TO DO: Write introduction. --> <!--# TO DO: Write introduction. -->

View File

@ -1,5 +1,9 @@
# Data import {#data-import} # Data import {#data-import}
```{r, results = "asis", echo = FALSE}
status("restructuring")
```
<!--# TO DO: This chapter got moved here from the wrangle section, make sure it makes sense in this new location, doesn't assume anything that comes after it. --> <!--# TO DO: This chapter got moved here from the wrangle section, make sure it makes sense in this new location, doesn't assume anything that comes after it. -->
## Introduction ## Introduction
@ -663,4 +667,4 @@ For rectangular data:
For hierarchical data: use **jsonlite** (by Jeroen Ooms) for json, and **xml2** for XML. For hierarchical data: use **jsonlite** (by Jeroen Ooms) for json, and **xml2** for XML.
Jenny Bryan has some excellent worked examples at <https://jennybc.github.io/purrr-tutorial/>. Jenny Bryan has some excellent worked examples at <https://jennybc.github.io/purrr-tutorial/>.
For other file types, try the [R data import/export manual](https://cran.r-project.org/doc/manuals/r-release/R-data.html) and the [**rio**](https://github.com/leeper/rio) package. For other file types, try the [R data import/export manual](https://cran.r-project.org/doc/manuals/r-release/R-data.html) and the [**rio**](https://github.com/leeper/rio) package.

View File

@ -1,5 +1,9 @@
# Data transformation {#data-transform} # Data transformation {#data-transform}
```{r, results = "asis", echo = FALSE}
status("restructuring")
```
## Introduction ## Introduction
Visualisation is an important tool for insight generation, but it is rare that you get the data in exactly the right form you need. Visualisation is an important tool for insight generation, but it is rare that you get the data in exactly the right form you need.

View File

@ -1,3 +1,7 @@
# Databases {#import-databases} # Databases {#import-databases}
```{r, results = "asis", echo = FALSE}
status("drafting")
```
<!--# TO DO: Write chapter. --> <!--# TO DO: Write chapter. -->

View File

@ -1,3 +1,7 @@
# Other types of data {#import-other} # Other types of data {#import-other}
```{r, results = "asis", echo = FALSE}
status("drafting")
```
<!--# TO DO: Write chapter. --> <!--# TO DO: Write chapter. -->

View File

@ -1,3 +1,7 @@
# Rectangular data {#import-rectangular} # Rectangular data {#import-rectangular}
```{r, results = "asis", echo = FALSE}
status("drafting")
```
<!--# TO DO: Write chapter. --> <!--# TO DO: Write chapter. -->

View File

@ -1,3 +1,7 @@
# Spreadsheets {#import-spreadsheets} # Spreadsheets {#import-spreadsheets}
```{r, results = "asis", echo = FALSE}
status("drafting")
```
<!--# TO DO: Write chapter. --> <!--# TO DO: Write chapter. -->

View File

@ -1,3 +1,7 @@
# Web scraping {#import-webscrape} # Web scraping {#import-webscrape}
```{r, results = "asis", echo = FALSE}
status("drafting")
```
<!--# TO DO: Write chapter. --> <!--# TO DO: Write chapter. -->

View File

@ -1,5 +1,9 @@
# List columns # List columns
```{r, results = "asis", echo = FALSE}
status("drafting")
```
## Introduction ## Introduction
<!--# TO DO: Write introduction. --> <!--# TO DO: Write introduction. -->

View File

@ -1,5 +1,9 @@
# Logicals and numbers {#logicals-numbers} # Logicals and numbers {#logicals-numbers}
```{r, results = "asis", echo = FALSE}
status("drafting")
```
## Introduction ## Introduction
`between()` `between()`

View File

@ -1,5 +1,9 @@
# Missing values {#missing-values} # Missing values {#missing-values}
```{r, results = "asis", echo = FALSE}
status("drafting")
```
## Introduction ## Introduction
```{r} ```{r}

View File

@ -1,5 +1,9 @@
# Programming with strings # Programming with strings
```{r, results = "asis", echo = FALSE}
status("drafting")
```
```{r} ```{r}
library(stringr) library(stringr)
library(tidyr) library(tidyr)

View File

@ -1,5 +1,9 @@
# Regular expressions # Regular expressions
```{r, results = "asis", echo = FALSE}
status("restructuring")
```
## Introduction ## Introduction
The focus of this chapter will be on regular expressions, or regexps for short. The focus of this chapter will be on regular expressions, or regexps for short.

View File

@ -1,5 +1,9 @@
# Strings # Strings
```{r, results = "asis", echo = FALSE}
status("restructuring")
```
## Introduction ## Introduction
This chapter introduces you to strings. This chapter introduces you to strings.

View File

@ -1,5 +1,9 @@
# Vector tools # Vector tools
```{r, results = "asis", echo = FALSE}
status("drafting")
```
## Introduction ## Introduction
`%in%` `%in%`