swirldev / swirl_courses

:mortar_board: A collection of interactive courses for the swirl R package.
http://swirlstats.com
Other
4.3k stars 7.25k forks source link

R Programming Lesson 8, Logic - '&&' Error #524

Open mheah opened 1 year ago

mheah commented 1 year ago

Stuck on this question: | Now we'll type the same expression except we'll use the && operator. Type the expression TRUE && c(TRUE, FALSE, FALSE).

TRUE && c(TRUE, FALSE, FALSE) Error in TRUE && c(TRUE, FALSE, FALSE) : 'length = 3' in coercion to 'logical(1)'

Does anyone face the same error as me? My R version is 4.3.0. Any solution to carry with the course? Thanks

miguel-samaniego commented 1 year ago

The same problem exists in R version 4.3.1. Couldn't find a fix so I ended up skipping that lesson. Did you find any solution?

yesezra commented 1 year ago

I too am having this issue, on R 4.3.1. Additionally the skip() function kicks me out of swirl entirely and I can't seem to recover my session.

Durbalan commented 1 year ago

I am also encountering the same problem. I have tried every possible way to get past the error warning, but nothing is working. I am totally new to this, so I don't know how such problems are resolved here. Can someone enlighten me, please?

gdickens commented 1 year ago

I'm facing the same issue.

It appears to be a result of a change in R 4.3:

"Calling && or || with LHS or (if evaluated) RHS of length greater than one is now always an error, with a report of the form 'length = 4' in coercion to 'logical(1)' Environment variable _R_CHECK_LENGTH_1LOGIC2 no longer has any effect."_ Source

Until it's fixed, I'll drop the lesson from my workshops.