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

Fix typo matix to matrix #47

Open
wants to merge 1 commit into
base: master
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
2 changes: 1 addition & 1 deletion speed.rmd
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ This new function would make it easy to simulate a million, or even 10 million p
# mean(plays$prize)
```

Now you just need to write `score_many`, a vectorized (matix-ized?) version of `score` that takes an _n_ x 3 matrix and returns _n_ prizes. It will be difficult to write this function because `score` is already quite complicated. I would not expect you to feel confident doing this on your own until you have more practice and experience than we've been able to develop here.
Now you just need to write `score_many`, a vectorized (matrix-ized?) version of `score` that takes an _n_ x 3 matrix and returns _n_ prizes. It will be difficult to write this function because `score` is already quite complicated. I would not expect you to feel confident doing this on your own until you have more practice and experience than we've been able to develop here.

Should you like to test your skills and write a version of `score_many`, I recommend that you use the function `rowSums` within your code. It calculates the sum of each row of numbers (or logicals) in a matrix.

Expand Down