Final Project: Implementation
Getting Started
Project Folder
To provide you some structure with which to start building your package, we’ll give you a folder that contains the DESCRIPTION
, LICENSE
, and NAMESPACE
files you need. Start by downloading the project folder.
Download the project folder
Open RStudio per the linked steps and navigate to the R console:
>
Next execute
getwd()
to print your working directory. Ensure your current working directory is where you’d like to download this problem’s distribution code. If using RStudio through cs50.dev the recommended directory is /workspaces/NUMBER
where NUMBER
is a number unique to your codespace.
If you do not see the right working directory, use setwd
to change it! Try typing setwd("..")
if in the working directory of another problem, which will move you one directory higher.
Next execute
download.file("https://cdn.cs50.net/r/2024/x/project/project.zip", "project.zip")
in order to download a ZIP called project.zip
into your codespace.
Then execute
unzip("project.zip")
to create a folder called project
. You no longer need the ZIP file, so you can execute
file.remove("project.zip")
Now type
setwd("project")
followed by Enter to move yourself into (i.e., open) that directory. Your working directory should now end with
project/
If all was successful, you should execute
list.files()
and see DESCRIPTION
, LICENSE
, and NAMESPACE
. If not, retrace your steps and see if you can determine where you went wrong!
Of course, you’ll likely want to rename your final project’s folder from project
to the name of your package. You can do so by using:
file.rename("OLD", "NEW")
where “OLD” is the old folder name and “NEW” is the new folder name, each in quotes. When you do this, just be sure your project folder is in your working directory and is not your current working directory itself.
Specification
At a high level, your final project should be an R package that includes at least 3 functions, with documentation and rigorous tests. To be more specific, your final project should include all of the following:
- A complete
DESCRIPTION
file - A complete
NAMESPACE
file - A complete
LICENSE
file, if appropriate - At least 3
.R
files in a folder namedR
, each one defining 1 function that is part of your package - At least 3
.Rd
files in a folder namedman
, each one documenting 1 of the functions you’ve implemented - At least 3
.R
files in a folder namedtests
, each one testing 1 of the functions you’ve implemented - A video overview of your package
The requirements for each of these components are described in more detail below.
DESCRIPTION
Your DESCRIPTION
file should be at least 100 characters long and contain the URL to your video overview in the Video
field.
NAMESPACE
You NAMESPACE
file should export
all functions from your package you’d like others to be able to use.
LICENSE
If needed, your LICENSE
file should provide additional information about the license you’ve chosen.
R
folder
Your R
folder should include at least 3 .R
files, each with a function definition inside of them.
man
folder
Your man
folder should include at least 3 .Rd
files, with at least these required components:
- A
name
attribute - A
description
attribute - A
usage
attribute - An
arguments
attribute - A
value
attribute - An
examples
attribute
You might find these “Guidelines for writing R help files” to be of use, if looking for ways to improve your writing!
tests
folder
Your tests
folder (or a subfolder of it) should contain at least 3 .R
files to test your functions from your R
folder.
Video Overview
Create a short video (that’s no more than 3 minutes in length) in which you present your project to the world, as with slides, screenshots, voiceover, and/or live action. Your video must begin with an opening section that displays:
- your project’s title;
- your name;
- your GitHub username;
- your city and country;
- and, the date you have recorded this video.
- See howtogeek.com/205742/how-to-record-your-windows-mac-linux-android-or-ios-screen for tips on how to make a “screencast,” though you’re welcome to use an actual camera. Upload your video to YouTube (or, if blocked in your country, a similar site) and take note of its URL; it’s fine to flag it as “unlisted,” but don’t flag it as “private.”
How to Submit
The submission window for the final project will not begin until the final week of the course.
- Go to CSCI E-5a’s Gradescope page.
- Select Final Project: Implementation.
- Upload all files inside of your package’s folder.
- Submit this debriefing form.
If you are collaborating with other students, it is incumbent on one member of the group to submit on behalf of everyone in the group (and everyone in the group is responsible for confirming they have a submission on file by the deadline).