---
title: "1. Introduction"
output: learnr::tutorial
runtime: shiny_prerendered
---

```{r setup, include=FALSE}
library(learnr)
knitr::opts_chunk$set(echo = FALSE)
```

## 1.1 Installation of R, RStudio and R Packages 

1. Which of the following code using to install packages into R will cause an error?

- `install.packages("r02pro")`
- `install.packages(r02pro)`

2. Write R code to load the package **r02pro**

```{r load_package, exercise=TRUE}

```



3. Write R code to calculate `2 + 3`.

```{r two-plus-three, exercise=TRUE}

```


## 1.2 Use R as a Fancy Calculator

1. Write R code to compute the square root of 5 times 5. 

```{r sqrt, exercise=TRUE}

```



2. Write R code to get help on the function `floor`.

```{r get_help, exercise=TRUE}

```



3. Write R code to compute the square of $\pi$ and round it to 4 digits after the decimal point. 

```{r pi_2_round, exercise=TRUE}

```


4. Write R code to compute the logarithm of 1 billion with base 1000. 

```{r log_base, exercise=TRUE}

```



5. Write R code to verify $sin^2(x) + cos^2(x) = 1$, for $x = 724$. 

```{r sin_cos, exercise=TRUE}

```
