Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev eds #5

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 20 additions & 3 deletions R_Bootcamp_Intro_R.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@
"metadata": {},
"outputs": [],
"source": [
"print( combined_vector[-c(4)] )"
"print(combined_vector[-c(4)])"
]
},
{
Expand Down Expand Up @@ -649,7 +649,7 @@
"metadata": {},
"outputs": [],
"source": [
"table( is.na( here_is_a_vector ) )"
"table(is.na(here_is_a_vector))"
]
},
{
Expand Down Expand Up @@ -987,6 +987,23 @@
"str(unlist(list_1))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"And also look at the difference in length between the original `list_1` and the vectorized `list_1`."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"print(length(list_1))\n",
"print(length(unlist(list_1)))\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -1652,7 +1669,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"So, the function itself is called `roll`, it takes the argument or formals `number_of_dice` and the body of the function uses the built-in `sample` function in R to simulate dice rolls (use ?sample to learn more about the `sample()` function). "
"So, the function itself is called `roll`, it takes the argument or formals `number_of_dice` and the body of the function uses the built-in `sample` function in R to simulate dice rolls (use `?sample` to learn more about the `sample()` function). "
]
},
{
Expand Down