EducationShinyAppTeam / App_Template

Sample boastApp
3 stars 2 forks source link

Define a standard metadata file using DESCRIPTION #4

Open rpc5102 opened 3 years ago

rpc5102 commented 3 years ago

Metadata inside apps can be useful for applying logic. Typically, in R, we will use a Debian Control File named DESCRIPTION to do this.

DESCRIPTION

Title: Hello Shiny!
Author: RStudio, Inc.
AuthorUrl: http://www.rstudio.com/
License: GPL-3
DisplayMode: Showcase
Tags: getting-started
Type: Shiny

Additional fields

neilhatfield commented 3 years ago

Additional Field: Learning Outcomes--this could be a single string or a list of strings Nickname: string (shortened version of App's title)

rpc5102 commented 3 years ago
Title: Sample App - A Lengthy Title
ShortName: Sample App
Date: 2020-11-02
Authors@R: c(person("Lorem", "Ipsum", email = "loremipsum@psu.edu",
  role = c("aut", "cre")))
Chapter: Sample Chapter
Description: This app is focused on the common types of xyz.
LearningObjectives: The student is expected to learn about xyz and the effects of abc.
DisplayMode: Normal
URL: https://psu-eberly.shinyapps.io/Sample_App
BugReports: https://github.com/EducationShinyAppTeam/Sample_App/issues
License: CC-BY-NC-SA-4.0
Tags: simulation
Type: Shiny
rpc5102 commented 3 years ago

Reading in multiple values for a given key:

> DESCRIPTION <- as.data.frame(read.dcf("DESCRIPTION"))
> obj <- eval(parse(text = DESCRIPTION$LearningObjectives))
> obj
[1] "The student will learn to understand Concept A in way z."        "The student will learn to understand Concept B as description y"
> obj[2]
[1] "The student will learn to understand Concept B as description y"