Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

exercise 3.14.3 error ? #4

Open
CharlesMagne opened this issue Aug 18, 2023 · 0 comments
Open

exercise 3.14.3 error ? #4

CharlesMagne opened this issue Aug 18, 2023 · 0 comments

Comments

@CharlesMagne
Copy link

sort(x^2-5)[1:2] can be rewritten as:
x %>% raise_to_power(2) %>% subtract(5) %>% extract(1:2,)
Returns: Error in extract(., 1:2, ) : incorrect number of dimensions
Correct solution:
x %>% raise_to_power(2) %>% subtract(5) %>% sort %>% extract(1:2)

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

No branches or pull requests

1 participant