From c28a0f8143cefef0776386a647514710926db80f Mon Sep 17 00:00:00 2001 From: Molly Offer-Westort Date: Mon, 8 Jan 2024 23:15:45 -0600 Subject: [PATCH 1/6] Update lesson.yaml fixing && issue --- Logic/lesson.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Logic/lesson.yaml b/Logic/lesson.yaml index d608cc7..ee6cd20 100644 --- a/Logic/lesson.yaml +++ b/Logic/lesson.yaml @@ -143,11 +143,11 @@ statement as c(TRUE, TRUE, TRUE) & c(TRUE, FALSE, FALSE). - Class: cmd_question - Output: "Now we'll type the same expression except we'll use the `&&` operator. Type the expression TRUE && c(TRUE, FALSE, FALSE)." - CorrectAnswer: "TRUE && c(TRUE, FALSE, FALSE)" - AnswerTests: omnitest(correctExpr='TRUE && c(TRUE, FALSE, FALSE)') + Output: "Now we'll type the same expression except we'll use the `&&` operator. Type the expression TRUE && c(TRUE, FALSE, FALSE). In versions of R > 4.3.0, YOU WILL GET AN ERROR. Once you get the error, type ok() to continue to the next question." + CorrectAnswer: ok() + AnswerTests: omnitest(correctExpr="ok()") Hint: "As you'll see, the && version of AND works differently. Type: - TRUE && c(TRUE, FALSE, FALSE)" + TRUE && c(TRUE, FALSE, FALSE), then type ok() to continue to the next question." - Class: text Output: "In this case, the left operand is only evaluated with the first member From 539bcaa7226775fd0e9c62caa9e408b4b45d9364 Mon Sep 17 00:00:00 2001 From: Molly Offer-Westort Date: Mon, 8 Jan 2024 23:40:53 -0600 Subject: [PATCH 2/6] Logic update lesson.yaml for second part of && --- Logic/lesson.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Logic/lesson.yaml b/Logic/lesson.yaml index ee6cd20..aca15e6 100644 --- a/Logic/lesson.yaml +++ b/Logic/lesson.yaml @@ -149,10 +149,12 @@ Hint: "As you'll see, the && version of AND works differently. Type: TRUE && c(TRUE, FALSE, FALSE), then type ok() to continue to the next question." -- Class: text - Output: "In this case, the left operand is only evaluated with the first member - of the right operand (the vector). The rest of the elements in the vector - aren't evaluated at all in this expression." +- Class: cmd_question + Output: "Now type the expression TRUE && TRUE" + CorrectAnswer: TRUE && TRUE + AnswerTests: omnitest(correctExpr="TRUE && TRUE") + Hint: "Now to see how the && operator works with a vector, type: + TRUE && TRUE" - Class : text Output: The OR operator follows a similar set of rules. The `|` version of OR From 5a3f4131592585c924cba87e807c55cb75298394 Mon Sep 17 00:00:00 2001 From: Molly Offer-Westort Date: Mon, 8 Jan 2024 23:41:46 -0600 Subject: [PATCH 3/6] ok() function for logic --- Logic/initLesson.R | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 Logic/initLesson.R diff --git a/Logic/initLesson.R b/Logic/initLesson.R new file mode 100644 index 0000000..7141153 --- /dev/null +++ b/Logic/initLesson.R @@ -0,0 +1,7 @@ +# For compatibility with 4.3.1 + +# Dummy function to advance user past question for which +# correct answer yields an error +ok <- function() { + invisible() +} \ No newline at end of file From 8fcfe966f2ee7e7f725e9d73f6c7f5cdfcb94bea Mon Sep 17 00:00:00 2001 From: Molly Offer-Westort Date: Mon, 8 Jan 2024 23:48:08 -0600 Subject: [PATCH 4/6] Update initLesson.R --- Logic/initLesson.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Logic/initLesson.R b/Logic/initLesson.R index 7141153..fa1c734 100644 --- a/Logic/initLesson.R +++ b/Logic/initLesson.R @@ -4,4 +4,4 @@ # correct answer yields an error ok <- function() { invisible() -} \ No newline at end of file +} From 365f27650b82f0ec0075b093764c5fb87b9d1e24 Mon Sep 17 00:00:00 2001 From: Molly Offer-Westort Date: Tue, 9 Jan 2024 00:04:59 -0600 Subject: [PATCH 5/6] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a6c474a..438070a 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ```r library(swirl) -install_course_github("swirldev", "R_Programming_E") +install_course_github("mollyow", "R_Programming_E") swirl() ``` @@ -16,4 +16,4 @@ swirl() ## Help -See http://swirlstats.com/, open an issue, or email info@swirlstats.com. \ No newline at end of file +See http://swirlstats.com/, open an issue, or email info@swirlstats.com. From a91e6c5b1860763983c793e09fcfa12abba39781 Mon Sep 17 00:00:00 2001 From: Molly Offer-Westort Date: Tue, 9 Jan 2024 00:05:18 -0600 Subject: [PATCH 6/6] Update README.md --- README.md | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/README.md b/README.md index 438070a..9c96d86 100644 --- a/README.md +++ b/README.md @@ -7,13 +7,3 @@ library(swirl) install_course_github("mollyow", "R_Programming_E") swirl() ``` - -### Manual Installation - -1. Download [this](https://github.com/swirldev/R_Programming_E/raw/master/R_Programming_E.swc) file. -2. Run `swirl::install_course()` in the R console. -3. Select the file you just downloaded. - -## Help - -See http://swirlstats.com/, open an issue, or email info@swirlstats.com.