Special-purpose function to download a folder of course materials. The only demand on the user is to confirm or specify where the new folder should be stored. Workflow:

• User executes something like: use_course("bit.ly/xxx-yyy-zzz").

• User is asked to notice and confirm the location of the new folder. Specify destdir to skip this.

• User is asked if they'd like to delete the ZIP file.

• If new folder contains an .Rproj file, it is opened. Otherwise, the folder is opened in the file manager, e.g. Finder or File Explorer.

use_course(url, destdir = NULL)

## Arguments

url Link to a ZIP file containing the materials, possibly behind a shortlink. Links of the form "repo/user" are expanded to the appropriate url for a repo on GitHub. Function developed with DropBox and GitHub in mind, but should work for ZIP files generally. If no "http" prefix is found, "https://" is prepended. See use_course_details for more. The new folder is stored here. Defaults to user's Desktop.

## Value

Path to the new directory holding the course materials, invisibly.

## Details

If url has no "http" prefix, "https://" is prepended, allowing for even less typing by the user. A url of the form "repo/user", is assumed to refer to a GitHub repository and is expanded appropriately, unless url matches a URL shortener service, currently only "bit.ly" or "rstd.io". Most URL shorteners give HTTPS links and, anecdotally, we note this appears to work with bit.ly links, even though they are nominally HTTP.

Other download functions: use_course_details

## Examples

# NOT RUN {
## should work with and without http prefix
# }