Problem with Swirl &&

I am learning R through swirl going through the lessons I came across the lesson on logicals when reaching the 42 % instruction I typed the instruction swirl gave me i.e. Type the
| expression TRUE && c(TRUE, FALSE, FALSE), when typing

{ TRUE && c(TRUE,FALSE,FALSE) } I got the following message

Error in TRUE && c(TRUE, FALSE, FALSE) :
'length = 3' in coercion to 'logical(1)'
Which I understand as is meant for the logical not to recycle and the function cannot finish. Nonetheless I cannot advance beyond this point for that lesson, I've even tried the skip() command and it just takes me out of swirl. Any ideas to finish the lesson?

Using vectors of more than one element in && or || will give an error.

(from help('&)

TRUE & c(TRUE,FALSE,FALSE)
#> [1]  TRUE FALSE FALSE

Created on 2023-10-12 with reprex v2.0.2

I understand that but the issue is swirl wants me to use
#>TRUE && c(TRUE,FALSE,FALSE)

tha yields an error that crashes swirl and even the #>skip() command yields the same error reply that crashes swirl

Have you tried with a single &?

Yeah, actually the previous exercise before this ones is precisely trying with just one &

Don’t see any way to fix this then

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.