2

My team is writing interactive lessons in R using Swirl (swirlify package). We were testing opening the lesson .csv file to see if it would work for users, however, came across the error in the image below. We ran 1install_course()1 in lesson_launchpad.R, and selected Data_Science_For_Lawyers.csv, then came across the error.

View Image

I have the latest version of R and RStudio, but am unsure of what the "#" package is and how to get it! Any information greatly appreciated. Thank you!

Github Repository: https://github.com/UCL-DSS/LegalTech

MrFlick
  • 195,160
  • 17
  • 277
  • 295
Amanda Lim
  • 31
  • 4
  • Solvable only because you provided a reproducible example (through GitHub, because posting all the code here would be cumbersome). +1 – Roman Luštrik Jul 04 '20 at 10:31

1 Answers1

1

There is a # in file ./LegalTech/Data_Science_For_Lawyers_Course/Lesson_One_-_Getting_Started/dependson.txt. Once I remove that and recompile the course, I get the next error.

> swirl()

| Welcome to swirl! Please sign in. If you've been here before, use the same name as you did
| then. If you are new, call yourself something unique.

What shall I call you? notamanda

| Please choose a course, or type 0 to exit swirl.

1: Data Science For Lawyers Course
2: Take me to the swirl course repository!

Selection: 1

| Please choose a lesson, or type 0 to return to course menu.

1: Lesson One - Getting Started

Selection: 1
Error in eval(ei, envir) : object 'Hello' not found

| Leaving swirl now. Type swirl() to resume.

Note that at least initLesson.R and customTests.R include Hello. You may want to comment that out.

How I came to this conclusion? To load a lession you need to run install the lesson and then export the pack into swc file. Looking into this file turned out to be a dead end as it's a binary file. Looking at the messages produced by swirl I got a hint - "Attempting to load lesson dependencies". I entered this into the search bar of swirl GitHub repository and found this line of code. Reading through the code up and down I found line 120 that mentions file dependson.txt. Looking at the contents of this file I saw that it contains a hash character. I removed it, recompiled the course and it solved this particular error.

Roman Luštrik
  • 69,533
  • 24
  • 154
  • 197