Mistake in Mission?

I believe the -4 and -6 are swapped.
If there’s a better place for for questions like this please let me know.

Screen Link:

My Code:

Vector_2  <- Vector_1 %>%
    str_sub(-4, -6)
1 Like

I do believe this is a mistake and have sent an email letting them know. The stringr documentation says the order of operations in str_sub is “It takes three arguments: a character vector, a start position and an end position.” If you’re using negative numbers to start from the right, then the farthest right you can go is the same negative number.

1 Like

Yes, this is a mistake, and we have logged this issue.

If you think there is a bug in the content, please create a ticket by clicking the Contact Us above. It allows us to log and keep track of an issue in a better way.