Skip to content

Commit

Permalink
Update the slides
Browse files Browse the repository at this point in the history
  • Loading branch information
nimarafati committed Oct 27, 2024
1 parent 382a60d commit 95295fe
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions slide_r_elements_1.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -275,27 +275,6 @@ and also:
Inf - Inf # Not a Number
```

---
name: cplx_numbers

# Complex number type

Core R supports complex numbers.

```{r cplx,echo=TRUE}
z = 7 + 4i # create a complex number
z
class(z)
typeof(z)
is.complex(z)
```

```{r cplx2,echo=TRUE}
sqrt(-1) # not treated as cplx number
sqrt(-1 + 0i) # now a proper cplx number
sqrt(as.complex(-1)) # an alternative way
```

---
name: logical_type

Expand Down

0 comments on commit 95295fe

Please sign in to comment.