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,
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}
```{r, results = "asis", echo = FALSE}
status("drafting")
```
## Introduction
<!--# TO DO: Write introduction. -->

View File

@ -1,5 +1,9 @@
# 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. -->
## Introduction

View File

@ -1,5 +1,9 @@
# Data transformation {#data-transform}
```{r, results = "asis", echo = FALSE}
status("restructuring")
```
## 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.

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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