Skip to content

Commit

Permalink
na.strings=""
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentarelbundock committed Oct 14, 2023
1 parent d820694 commit 8d9ee64
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions vignettes/appearance.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ To illustrate, we download data from the [Rdatasets repository](https://vincenta
library(modelsummary)
url <- 'https://vincentarelbundock.github.io/Rdatasets/csv/HistData/Guerry.csv'
dat <- read.csv(url)
dat <- read.csv(url, na.strings = "")
models <- list()
models[['OLS 1']] <- lm(Donations ~ Literacy, data = dat)
Expand Down Expand Up @@ -211,7 +211,7 @@ modelsummary(mod, output = "gt")

```{r}
url <- 'https://vincentarelbundock.github.io/Rdatasets/csv/palmerpenguins/penguins.csv'
penguins <- read.csv(url)
penguins <- read.csv(url, na.strings = "")
datasummary_crosstab(island ~ sex * species, output = "gt", data = penguins)
```
Expand Down
8 changes: 4 additions & 4 deletions vignettes/datasummary.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ library(kableExtra)
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.'
src <- 'Data source: Gorman, Williams & Fraser (2014) and palmerpenguins package by @apreshill and @allison_horst.'
url <- 'https://vincentarelbundock.github.io/Rdatasets/csv/palmerpenguins/penguins.csv'
penguins <- read.csv(url) %>%
penguins <- read.csv(url, na.strings = "") %>%
select(Species = species,
Island = island,
Sex = sex,
Expand Down Expand Up @@ -86,7 +86,7 @@ library(modelsummary)
library(tidyverse)
url <- 'https://vincentarelbundock.github.io/Rdatasets/csv/palmerpenguins/penguins.csv'
penguins <- read.csv(url)
penguins <- read.csv(url, na.strings = "")
```

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

0 comments on commit 8d9ee64

Please sign in to comment.