Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
mine-cetinkaya-rundel committed Apr 16, 2020
1 parent b361ba2 commit b0e9ee5
Show file tree
Hide file tree
Showing 5 changed files with 545 additions and 5 deletions.
48 changes: 48 additions & 0 deletions 06-data-types/01-type-coercion.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ output: html_document
c(1, NA+1L, "C")
```

```{r}
1
NA+1L
"C"
```

```{r}
typeof(c(1, NA+1L, "C"))
```


- `c(1L / 0, NA)`
Expand All @@ -17,36 +26,75 @@ c(1, NA+1L, "C")
c(1L / 0, NA)
```

```{r}
typeof(1L)
typeof(0)
typeof(1L/0) # Inf
typeof(NA)
```

```{r}
typeof(c(1L / 0, NA))
```

- `c(1:3, 5)`

```{r}
c(1:3, 5)
```

```{r}
typeof(1:3)
typeof(5)
```

```{r}
typeof(c(1:3, 5))
```

- `c(3, "3+")`

```{r}
c(3, "3+")
```

```{r}
typeof(3)
typeof("3+")
```

```{r}
typeof(c(3, "3+"))
```

- `c(NA, TRUE)`

```{r}
c(NA, TRUE)
```

```{r}
typeof(NA)
typeof(TRUE)
```

```{r}
typeof(c(NA, TRUE))
```

- `c(3L, NaN+1L)`

```{r}
c(3L, NaN+1L)
```

```{r}
typeof(3L)
typeof(NaN)
typeof(1L)
typeof(NaN+1L)
```

```{r}
typeof(c(3L, NaN+1L))
```
492 changes: 492 additions & 0 deletions 06-data-types/01-type-coercion.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion slides/06-data-types/06-data-types.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ hotels %>%
labs(x = "Arrival month", # customize labels
y = "Mean ADR (average daily rate)",
title = "Comparison of resort and city hotel prices across months",
subtitle = "Resort hotel prices soar in the summer while ciry hotel prices remain relatively constant throughout the year",
subtitle = "Resort hotel prices soar in the summer while city hotel prices remain relatively constant throughout the year",
color = "Hotel type")
```

Expand Down
8 changes: 4 additions & 4 deletions slides/06-data-types/06-data-types.html
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@
]
]

<div class="countdown" id="timer_5e988830" style="right:0;bottom:0;" data-warnwhen="0">
<div class="countdown" id="timer_5e98aefb" style="right:0;bottom:0;" data-warnwhen="0">
<code class="countdown-time"><span class="countdown-digits minutes">10</span><span class="countdown-digits colon">:</span><span class="countdown-digits seconds">00</span></code>
</div>

Expand Down Expand Up @@ -650,8 +650,8 @@
## Let's take another look

.small[
<div id="htmlwidget-9427d3b7c2e3fede5c79" style="width:100%;height:auto;" class="datatables html-widget"></div>
<script type="application/json" data-for="htmlwidget-9427d3b7c2e3fede5c79">{"x":{"filter":"none","data":[["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59","60"],["Bernice Warren","Woodrow Stone","Willie Bass","Tyrone Estrada","Alex Daniels","Jane Bates","Latoya Simpson","Darin Woods","Agnes Cobb","Tabitha Grant","Perry Cross","Wanda Silva","Alicia Sims","Emily Logan","Woodrow Elliott","Brent Copeland","Pedro Carlson","Patsy Luna","Brett Robbins","Oliver George","Calvin Perry","Lora Gutierrez","Charlotte Sparks","Earl Mack","Leslie Wade","Santiago Barker","Jose Bell","Lynda Smith","Bradford Marshall","Irving Miller","Caroline Simpson","Frances Welch","Melba Jenkins","Veronica Morales","Juanita Cunningham","Maurice Howard","Teri Pierce","Phil Franklin","Jan Zimmerman","Leslie Price","Bessie Patterson","Ethel Wolfe","Naomi Wright","Sadie Frank","Lonnie Cannon","Tony Garcia","Darla Newton","Ginger Clark","Lionel Campbell","Florence Klein","Harriet Leonard","Terrence Harrington","Travis Garner","Doug Bass","Pat Norris","Dawn Young","Shari Alvarez","Tamara Robinson","Megan Morgan","Kara Obrien"],["0","0","1","3","3","2","1","1","0","0","0","0","1","3","3","2","1","1","0","0","1","1","0","0","4","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","1","3","3","2","1","1.5 - honestly I think one of my cats is half human","0","0","0","0","1","three","1","1","1","0","0","2"],["left","left","left","left","left","left","left","left","left","left","left","left","left","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","ambidextrous","ambidextrous","ambidextrous","ambidextrous","ambidextrous"]],"container":"<table class=\"display\">\n <thead>\n <tr>\n <th> <\/th>\n <th>name<\/th>\n <th>number_of_cats<\/th>\n <th>handedness<\/th>\n <\/tr>\n <\/thead>\n<\/table>","options":{"order":[],"autoWidth":false,"orderClasses":false,"columnDefs":[{"orderable":false,"targets":0}]}},"evals":[],"jsHooks":[]}</script>
<div id="htmlwidget-454ecd730d7db73d0383" style="width:100%;height:auto;" class="datatables html-widget"></div>
<script type="application/json" data-for="htmlwidget-454ecd730d7db73d0383">{"x":{"filter":"none","data":[["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59","60"],["Bernice Warren","Woodrow Stone","Willie Bass","Tyrone Estrada","Alex Daniels","Jane Bates","Latoya Simpson","Darin Woods","Agnes Cobb","Tabitha Grant","Perry Cross","Wanda Silva","Alicia Sims","Emily Logan","Woodrow Elliott","Brent Copeland","Pedro Carlson","Patsy Luna","Brett Robbins","Oliver George","Calvin Perry","Lora Gutierrez","Charlotte Sparks","Earl Mack","Leslie Wade","Santiago Barker","Jose Bell","Lynda Smith","Bradford Marshall","Irving Miller","Caroline Simpson","Frances Welch","Melba Jenkins","Veronica Morales","Juanita Cunningham","Maurice Howard","Teri Pierce","Phil Franklin","Jan Zimmerman","Leslie Price","Bessie Patterson","Ethel Wolfe","Naomi Wright","Sadie Frank","Lonnie Cannon","Tony Garcia","Darla Newton","Ginger Clark","Lionel Campbell","Florence Klein","Harriet Leonard","Terrence Harrington","Travis Garner","Doug Bass","Pat Norris","Dawn Young","Shari Alvarez","Tamara Robinson","Megan Morgan","Kara Obrien"],["0","0","1","3","3","2","1","1","0","0","0","0","1","3","3","2","1","1","0","0","1","1","0","0","4","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","1","3","3","2","1","1.5 - honestly I think one of my cats is half human","0","0","0","0","1","three","1","1","1","0","0","2"],["left","left","left","left","left","left","left","left","left","left","left","left","left","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","right","ambidextrous","ambidextrous","ambidextrous","ambidextrous","ambidextrous"]],"container":"<table class=\"display\">\n <thead>\n <tr>\n <th> <\/th>\n <th>name<\/th>\n <th>number_of_cats<\/th>\n <th>handedness<\/th>\n <\/tr>\n <\/thead>\n<\/table>","options":{"order":[],"autoWidth":false,"orderClasses":false,"columnDefs":[{"orderable":false,"targets":0}]}},"evals":[],"jsHooks":[]}</script>
]

---
Expand Down Expand Up @@ -1083,7 +1083,7 @@

![](06-data-types_files/figure-html/unnamed-chunk-55-1.png)&lt;!-- --&gt;

<div class="countdown" id="timer_5e9886c0" style="right:0;bottom:0;" data-warnwhen="0">
<div class="countdown" id="timer_5e98afc8" style="right:0;bottom:0;" data-warnwhen="0">
<code class="countdown-time"><span class="countdown-digits minutes">05</span><span class="countdown-digits colon">:</span><span class="countdown-digits seconds">00</span></code>
</div>

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b0e9ee5

Please sign in to comment.