Skip to content

Commit

Permalink
remove the code chunk
Browse files Browse the repository at this point in the history
  • Loading branch information
ntluong95 committed Jun 16, 2024
1 parent ae7bc52 commit 21bb3d9
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions new_pages/basics.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -306,12 +306,6 @@ This basics section on functions explains:
sqrt(49)
```

Another example of function
```{r basics_function_mean}
# Calculate the mean of a vector of numbers
mean(c(1, 2, 3, 4, 5))
```

The object provided to a function also can be a column in a dataset (see the [Objects](#objects) section for detail on all the kinds of objects). Because R can store multiple datasets, you will need to specify both the dataset and the column. One way to do this is using the `$` notation to link the name of the dataset and the name of the column (`dataset$column`). In the example below, the function `summary()` is applied to the numeric column `age` in the dataset `linelist`, and the output is a summary of the column's numeric and missing values.

```{r basics_functions_summary}
Expand Down

0 comments on commit 21bb3d9

Please sign in to comment.