Chapter 15 Documentation

These apps are the product of your hard work and are part of your academic record. Thus, you need to adhere to Penn State’s Academic Integrity Policy. This is especially important as we are making the apps available through a Creative Commons Attribution-NonCommerical-ShareAlike 4.0 International license (CC BY-NC-SA 4.0). If you have used code, pictures, data, or other materials from outside of the BOAST team, you MUST give proper credit. These references will then be included on the App’s References Tab.

15.1 References

All apps will need a References Tab. This is where you’ll place all references for your App, including R packages, borrowed code, data sources, images, etc. This in addition to the Acknowledgments.

NOTE: listing something in the Acknowledgments DOES NOT waive this requirement.

We will make use of the American Statistical Association’s reference style. Please check with Neil, Matt, and Dennis for getting assistance. You can see this style in action, with the Reference Tab example of Chapter ??. Here is a starting code block for you to use:

#[omitted code]
tabItem(
  tabName = "refs",
  withMathJax(),
  h2("References"),
  p(class = "hangingindent",
    "reference 1-alphabetically"),
  p(class = "hangingindent",
    "reference 2-alphabetically"),
  # Repeat as needed
)

Notice the use of class = "hangingindent". You must include this with each reference as this will ensure the proper styling of your references.

If you need assistance with this section, please talk to Neil.

15.2 Plagiarism

You MAY NOT use blocks of code you’ve found online without giving proper attribution.

There is a difference between looking at example code online to see how to do something and copying that code directly. The former is permissible, the later is plagiarism.

  • If you want to use someone else’s code “as is” (without any changes), you should reach out to the author for permission first.
  • If you use someone else’s code and make modifications, you need to give credit to where you got the code, and potentially ask for permission.

You will need to place citations in two places: in the References Tab and in your code. You might want to also consider adding an acknowledgement to the Overview tab.

15.2.1 Reference Tab

Use the following format:

Author. (Date), Title of program/source code, [type of code]. Available from < URL >.

For example,

Hatfield, N. J. (2017), First day activity, Netlogo. Available from https://neilhatfield.github.io/statApps/Day1Activity.html.

15.2.2 In Code

Use the following format in your code to cite where you got the code from.

#-------------------------------------------------------------------------------
#  Title: <title of program/source code>
#  Author: <author(s) names>
#  Date: <date>
#  Code version: <code version>
#  Availability: <where it's located>
#-------------------------------------------------------------------------------
# [borrowed code then follows]
# ...
# [last line of borrowed code]      
#End of <author>'s code----------------------------------------------------------

15.3 R Packages

If you made use of any packages in R, then you will need to add these to the Reference tab. Fortunately, there is a built-in tool that will help you: the citation function. In R (RStudio) simply type citation("packageName") and you’ll get the appropriate citation information for the package you used. For example, citation("shinydashboard") and citation("plyr") will give the information needed for the following citations:

Chang, W. and Borges Ribeio, B. (2018), shinydashboard: Create dashboards with ‘Shiny’, R Package. Available from https://CRAN.R-project.org/package=shinydashboard

Wickham, H. (2011), “The Split-apply-combine strategy for data analysis”. Journal of Statistical Software, 40, pp. 1-29. Available at http://www.jstatsoft.org/v40/i01/.

Notice, that the format of the R package will depend on whether there is an article published for the package. The shinydashboard package is not associated with an article while the plyr package is associated with Wickham’s article.

15.4 Graphics

Pictures, drawings, photographs, images, etc. are typically copyrighted. When you’re selecting images, make sure that the images are Open Source/Copyright Free/Royalty Free/Public Domain. Additionally, include a reference to where the pictures came from in the Overview Page. The basic format to use is:

LastName, First Initial. (Year), Title of artwork. Retrieved from < URL > (if available).

15.5 Data

If you are using any data files, you need to attribute where those files are coming from in the References tab. You might also want to add an acknowledgment on the Overview tab. A suggested format to use is:

Author/Rightsholder. (Year), Title of data set, [Description of form], Location: Name of producer.

Author/Rightsholder. (Year), Title of data set, [Description of form]. Available at http://www.url.com

If you (or someone else) had to sign some type of agreement to access the data, we must examine the agreement before you make your App publicly accessible. Just because you got access to the data does not mean you have the right to share the data.