2

我的团队正在使用 Swirl(swirlify 包)在 R 中编写交互式课程。我们正在测试打开课程 .csv 文件以查看它是否适用于用户,但是遇到了下图中的错误。我们在 course_launchpad.R 中运行 1install_course()1,并选择了 Data_Science_For_Lawyers.csv,然后遇到了错误。

看图

我有最新版本的 R 和 RStudio,但不确定“#”包是什么以及如何获取它!非常感谢任何信息。谢谢!

Github 存储库:https ://github.com/UCL-DSS/LegalTech

4

1 回答 1

1

#文件中有一个./LegalTech/Data_Science_For_Lawyers_Course/Lesson_One_-_Getting_Started/dependson.txt。一旦我删除它并重新编译课程,我就会收到下一个错误。

> 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.

请注意,至少initLesson.RcustomTests.R包括Hello. 你可能想把它注释掉。

我是怎么得出这个结论的?要加载课程,您需要运行安装课程,然后将包导出到swc文件中。调查这个文件原来是一个死胡同,因为它是一个二进制文件。查看生成的消息,swirl我得到了一个提示——“尝试加载课程依赖项”。我把这个输入到swirl GitHub存储库的搜索栏中,找到了这行代码。上下阅读代码,我发现第120行提到了 file dependson.txt。查看这个文件的内容,我看到它包含一个哈希字符。我删除了它,重新编译了课程,它解决了这个特定的错误。

于 2020-07-04T08:47:02.113 回答