Giter VIP home page Giter VIP logo

Comments (1)

loelschlaeger avatar loelschlaeger commented on May 28, 2024

Zur Dokumentation des R-Pakets:

Der beste Weg, Funktionen zu dokumentieren, ist in den R-Skripts direkt über den Funktionen sogenannte Roxygen Tags einzubauen (das sind Kommentare, die einer bestimmten Struktur folgen, ist eigentlich ganz einfach). Ich hab das in dem File conf.R mal gemacht, so kann das z.B. aussehen (sehr kurz gehalten, etwas detailliertere Erklärungen wären natürlich besser):

#' Compute confidence intervals for the estimates ​(kurze Beschreibung, was die Funktion macht)
#'
#' @param fit A fitted model ​(hier werden alle Inputs definiert und kurz beschrieben)
#' @param alpha confidence level, default 0.95
#'
#' @return A list containing the following elements: ​(hier werden alle Outputs definiert und kurz beschrieben)
#' \item{lower_limit}{the lower limits of the intervals}
#' \item{estimate}{the estimates}
#' \item{upper_limit}{the upper limits of the intervals}
#'
#' @examples ​(hier werden Beispiele gegeben, wie die Funktion angewendet werden kann)
#' conf_int(fit = fit)

Die ersten drei Blöcke sollten bei jeder Funktion vorhanden sein, der letzte Block ist eigentlich nur für Funktionen sinnvoll, die vom User auch verwendet werden (also nicht für interne Funktionen, die nur von anderen Funktionen verwendet werden). Man kann das natürlich noch viel detaillierter machen und z.B. Literatur, Formeln o.ä. einbauen, aber da können wir ja später noch drüber sprechen, falls das relevant ist. Der Vorteil dabei ist, das man so mit einem Befehl automatisch alle Dokumentations-Files erstellen kann, die notwendig sind - sobald wir das haben, können wir das Package bestimmt an einem Tag oder so fertigstellen.

Im moveHMM-Package wurde die Dokumentation auch mit Roxygen gemacht, da kann man sich gut inspirieren lassen: https://github.com/TheoMichelot/moveHMM/tree/master/R

from fhmm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.