Skip to content

Commit 8d9ee64

Browse files
na.strings=""
1 parent d820694 commit 8d9ee64

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

vignettes/appearance.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ To illustrate, we download data from the [Rdatasets repository](https://vincenta
2828
library(modelsummary)
2929
3030
url <- 'https://vincentarelbundock.github.io/Rdatasets/csv/HistData/Guerry.csv'
31-
dat <- read.csv(url)
31+
dat <- read.csv(url, na.strings = "")
3232
3333
models <- list()
3434
models[['OLS 1']] <- lm(Donations ~ Literacy, data = dat)
@@ -211,7 +211,7 @@ modelsummary(mod, output = "gt")
211211

212212
```{r}
213213
url <- 'https://vincentarelbundock.github.io/Rdatasets/csv/palmerpenguins/penguins.csv'
214-
penguins <- read.csv(url)
214+
penguins <- read.csv(url, na.strings = "")
215215
216216
datasummary_crosstab(island ~ sex * species, output = "gt", data = penguins)
217217
```

vignettes/datasummary.Rmd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ library(kableExtra)
5252
cap <- 'Penguin flipper lengths (mm) by location, species, and sex. This table was created using the \\texttt{datasummary} function from the modelsummary package for R.'
5353
src <- 'Data source: Gorman, Williams & Fraser (2014) and palmerpenguins package by @apreshill and @allison_horst.'
5454
url <- 'https://vincentarelbundock.github.io/Rdatasets/csv/palmerpenguins/penguins.csv'
55-
penguins <- read.csv(url) %>%
55+
penguins <- read.csv(url, na.strings = "") %>%
5656
select(Species = species,
5757
Island = island,
5858
Sex = sex,
@@ -86,7 +86,7 @@ library(modelsummary)
8686
library(tidyverse)
8787
8888
url <- 'https://vincentarelbundock.github.io/Rdatasets/csv/palmerpenguins/penguins.csv'
89-
penguins <- read.csv(url)
89+
penguins <- read.csv(url, na.strings = "")
9090
```
9191

9292
```{r, echo=FALSE}
@@ -137,7 +137,7 @@ To illustrate how to build a balance table using the `datasummary_balance` funct
137137
```{r}
138138
# Download and read data
139139
training <- 'https://vincentarelbundock.github.io/Rdatasets/csv/Ecdat/Treatment.csv'
140-
training <- read.csv(training)
140+
training <- read.csv(training, na.strings = "")
141141
142142
# Rename and recode variables
143143
training <- training %>%
@@ -207,7 +207,7 @@ A cross tabulation is often useful to explore the association between two catego
207207
```{r}
208208
library(modelsummary)
209209
url <- 'https://vincentarelbundock.github.io/Rdatasets/csv/palmerpenguins/penguins.csv'
210-
penguins <- read.csv(url)
210+
penguins <- read.csv(url, na.strings = "")
211211
212212
datasummary_crosstab(species ~ sex, data = penguins)
213213
```

0 commit comments

Comments
 (0)