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

Wrong example in Lesson 18. #15

Open
khangquangtran opened this issue Sep 6, 2022 · 0 comments
Open

Wrong example in Lesson 18. #15

khangquangtran opened this issue Sep 6, 2022 · 0 comments

Comments

@khangquangtran
Copy link

In Lesson 18, in the second code section, "this little example":

> d <- data.frame(x=c(1,0,3),y=c(0,0,13))
> d
x y
1 1 0
2 0 0
> which(d[,2] == 0)
[1] 1 2 # ah yes; the 0 elements in column 2 are at indices 1 and 2

The data frame d should have 3 rows and 2 columns and should be as follows (sorry, I can't add whitespaces in front of "x y"):
x y
1 1 0
2 0 0
3 3 13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant