Add chapter status
This commit is contained in:
parent
3a45ea5fc5
commit
8efc22598b
17
_common.R
17
_common.R
|
@ -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"
|
||||
))
|
||||
}
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
# Column-wise operations {#column-wise}
|
||||
|
||||
```{r, results = "asis", echo = FALSE}
|
||||
status("drafting")
|
||||
```
|
||||
|
||||
## Introduction
|
||||
|
||||
<!--# TO DO: Write introduction. -->
|
||||
|
|
|
@ -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
|
||||
|
@ -663,4 +667,4 @@ For rectangular data:
|
|||
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/>.
|
||||
|
||||
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.
|
|
@ -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.
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
# Databases {#import-databases}
|
||||
|
||||
```{r, results = "asis", echo = FALSE}
|
||||
status("drafting")
|
||||
```
|
||||
|
||||
<!--# TO DO: Write chapter. -->
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
# Other types of data {#import-other}
|
||||
|
||||
```{r, results = "asis", echo = FALSE}
|
||||
status("drafting")
|
||||
```
|
||||
|
||||
<!--# TO DO: Write chapter. -->
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
# Rectangular data {#import-rectangular}
|
||||
|
||||
```{r, results = "asis", echo = FALSE}
|
||||
status("drafting")
|
||||
```
|
||||
|
||||
<!--# TO DO: Write chapter. -->
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
# Spreadsheets {#import-spreadsheets}
|
||||
|
||||
```{r, results = "asis", echo = FALSE}
|
||||
status("drafting")
|
||||
```
|
||||
|
||||
<!--# TO DO: Write chapter. -->
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
# Web scraping {#import-webscrape}
|
||||
|
||||
```{r, results = "asis", echo = FALSE}
|
||||
status("drafting")
|
||||
```
|
||||
|
||||
<!--# TO DO: Write chapter. -->
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
# List columns
|
||||
|
||||
```{r, results = "asis", echo = FALSE}
|
||||
status("drafting")
|
||||
```
|
||||
|
||||
## Introduction
|
||||
|
||||
<!--# TO DO: Write introduction. -->
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
# Logicals and numbers {#logicals-numbers}
|
||||
|
||||
```{r, results = "asis", echo = FALSE}
|
||||
status("drafting")
|
||||
```
|
||||
|
||||
## Introduction
|
||||
|
||||
`between()`
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
# Missing values {#missing-values}
|
||||
|
||||
```{r, results = "asis", echo = FALSE}
|
||||
status("drafting")
|
||||
```
|
||||
|
||||
## Introduction
|
||||
|
||||
```{r}
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
# Programming with strings
|
||||
|
||||
```{r, results = "asis", echo = FALSE}
|
||||
status("drafting")
|
||||
```
|
||||
|
||||
```{r}
|
||||
library(stringr)
|
||||
library(tidyr)
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
# Strings
|
||||
|
||||
```{r, results = "asis", echo = FALSE}
|
||||
status("restructuring")
|
||||
```
|
||||
|
||||
## Introduction
|
||||
|
||||
This chapter introduces you to strings.
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
# Vector tools
|
||||
|
||||
```{r, results = "asis", echo = FALSE}
|
||||
status("drafting")
|
||||
```
|
||||
|
||||
## Introduction
|
||||
|
||||
`%in%`
|
||||
|
|
Loading…
Reference in New Issue