-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Intro_to_Base_R: Switch iris -> penguins dataset #403
Conversation
mean(iris$Sepal.Length) | ||
```{r penguins-col-mean, live = TRUE} | ||
# calculate the mean of the bill_length_mm column | ||
mean(penguins$bill_length_mm, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm debating about leaving it like this and just gliding right through this argument OR adding some more steps to this and asking the participants whether they notice that their are NA
s in this set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess main question is how much time we want to devote to this NA
thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is fine as is. This is a place where live coding should work well.
Note that the comment you have here will be stripped out, as only full line comments are kept. In this case, I think this is a good thing! It means that somebody looking at the rendered notebook will see the full explanation, but live participants won't see it before somethin goes 'wrong'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah good point. I wasn't thinking about the live
-ness part.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good! A few suggestions on loading the data and a couple wording things, some of which are barely related. Also, art!
Oh, and the package needs to go into renv first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few more little changes, but also one bigger thing ("What do we call things?") that was not part of the intent of this PR, but came up because of it. Feel free to just pull that into a separate issue if you don't want to address it now.
We will begin our exploration with the old trusted dataset `iris`, which comes with R. | ||
Learn about this dataset using the standard help approach of `?iris`. | ||
We will begin our exploration with dataset about penguins from the [`palmerpenguins` package](https://allisonhorst.github.io/palmerpenguins/). | ||
To use this dataset, we will need to extract it from the `palmerpenguins` using a `::` (more on this later). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm using the word "environment" here but I realized that this notebook uses the word "environment" a couple of different ways, to refer both to the overall interface, and to the variables that are present in the "workspace", shown in the Environment pane.
To use this dataset, we will need to extract it from the `palmerpenguins` using a `::` (more on this later). | |
To use this dataset, we will load it from the `palmerpenguins` package using a `::` (more on this later) and assign it to a variable named `penguins` in our current environment. |
We should try to standardize on a single meaning for each word, if we can. Unfortunately, RStudio uses "workspace" (load/save/clear workspace) and "environment" (the name of the pane) in its interface to mean mostly the same thing, but it does mean that both of those words are problematic to describe the whole shebang, as we do on line 47 (and in the objectives).
Maybe we should call it the "RStudio Interface" which I don't love, but don't have anything better right now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. This is good thing to streamline, but probably outside the scope of this PR. I'll make an issue for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…-modules into cansavvy/penguins
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I just suggested adding back na.rm
(with a comment).
Co-authored-by: jashapiro <[email protected]>
Summary:
Closes #317
I went through intro_to_base_R.Rmd and replaced steps that used iris with penguins!
Here's the main drawbacks or changes we may want to discuss:
mean()
step I had to use ana.rm = TRUE
I don't like adding in an argument so soon, but if there's a better way to explain it or circumvent it, let me know.