-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 10b349c
Showing
4,281 changed files
with
726,767 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
^renv$ | ||
^renv\.lock$ | ||
^.*\.Rproj$ | ||
^\.Rproj\.user$ | ||
^_pkgdown\.yml$ | ||
^docs$ | ||
^pkgdown$ | ||
^doc$ | ||
^Meta$ | ||
^\.github$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
source("renv/activate.R") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.Rproj.user | ||
.Renviron | ||
.Rprofil | ||
.Rhistory | ||
.RData | ||
.Ruserdata | ||
docs | ||
inst/doc | ||
/doc/ | ||
/Meta/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Package: studyr | ||
Type: Package | ||
Title: Self Study Tutorials for the University of Frankfurt | ||
Version: 0.1.0 | ||
Authors@R: | ||
c(person(given = "Meike", | ||
family = "Steinhilber", | ||
role = c("aut", "cre"), | ||
email = "Meike.Steinhilber@aol.com", | ||
comment = c(ORCID = "0000-0002-7144-2100")) | ||
) | ||
Maintainer: Meike Steinhilber <Meike.Steinhilber@aol.com> | ||
Description: | ||
Self Study Tutorials for the University of Frankfurt. | ||
License: GPL (>= 3) | ||
Encoding: UTF-8 | ||
LazyData: true | ||
RoxygenNote: 7.2.3 | ||
Imports: | ||
learnr, | ||
rsconnect | ||
Suggests: | ||
knitr, | ||
rmarkdown | ||
VignetteBuilder: knitr | ||
URL: https://meikesteinhilber.github.io/studyr/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Generated by roxygen2: do not edit by hand | ||
|
||
export(colorize) | ||
export(open_tutorial) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#' colorizes Text in the studyr package | ||
#' | ||
#' @param x Text | ||
#' @param color Colour | ||
#' | ||
#' @return Coloured text | ||
#' @export | ||
#' | ||
colorize <- function(x, color) { | ||
if (knitr::is_latex_output()) { | ||
sprintf("\\textcolor{%s}{%s}", color, x) | ||
} else if (knitr::is_html_output()) { | ||
sprintf("<span style='color: %s;'>%s</span>", color, | ||
x) | ||
} else x | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# library(learnr) | ||
# library(roxygen2) | ||
|
||
|
||
#' Open Tutorials in the studyr package | ||
#' | ||
#' @param tutorial_name character string | ||
#' | ||
#' @return opens the tutorial | ||
#' @export | ||
#' | ||
##' @examples open_tutorial() | ||
open_tutorial <- function(tutorial_name) { | ||
if (!is.character(tutorial)) {stop("Invalid input argument: tutorial name must be a charcter string.")} | ||
learnr::run_tutorial(tutorial, package = "studyr") | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
test_function <- function() { | ||
print("Test successfull") | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
output: github_document | ||
editor_options: | ||
markdown: | ||
mode: gfm | ||
--- | ||
|
||
# *studyr* | ||
|
||
<!-- badges: start --> | ||
[![CRAN status](https://www.r-pkg.org/badges/version/studyr)](https://cran.r-project.org/package=studyr) | ||
|
||
<!-- badges: end --> | ||
|
||
```{r setup, include=FALSE} | ||
knitr::opts_chunk$set( | ||
echo = TRUE, | ||
collapse = TRUE, | ||
comment = "#>", | ||
# fig.path = "man/figures/README-", | ||
out.width = "100%" | ||
) | ||
options(tibble.print_min = 5, tibble.print_max = 5) | ||
``` | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
# *studyr* | ||
|
||
<!-- badges: start --> | ||
|
||
[![CRAN | ||
status](https://www.r-pkg.org/badges/version/studyr)](https://cran.r-project.org/package=studyr) | ||
|
||
<!-- badges: end --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
url: https://meikesteinhilber.github.io/studyr/ | ||
css: solid.css | ||
|
||
template: | ||
bootstrap: 5 | ||
bootswatch: minty | ||
lang: de | ||
bslib: | ||
pkgdown-nav-height: 100px | ||
|
||
|
||
home: | ||
title: Self Study of R using Tutorials | ||
|
||
navbar: | ||
structure: | ||
left: [intro, articles, tutorials, reference, news] | ||
right: [suche, github] | ||
components: | ||
|
||
intro: | ||
icon: fa-solid fa-home | ||
href: articles/studyr.html | ||
aria-label: Startseite | ||
|
||
reference: | ||
text: Funktionen | ||
menu: | ||
- text: open_tutorial() | ||
href: reference/open_tutorial.html | ||
|
||
articles: | ||
text: Artikel | ||
menu: | ||
- text: Übersicht | ||
href: articles/uebersicht.html | ||
|
||
tutorials: | ||
text: Tutorials | ||
menu: | ||
- text: Beispiel | ||
href: https://meike-steinhilber.shinyapps.io/tutorial_1/ | ||
- text: RStudio Grundlagen | ||
href: https://meike-steinhilber.shinyapps.io/tutorial_2/ | ||
|
||
github: | ||
icon: fa-github | ||
href: https://github.com/MeikeSteinhilber/studyr | ||
aria-label: GitHub | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# Wiederholung von Skript 1 | ||
|
||
## Übung 1: Grundlegendes | ||
|
||
1. Ordne in jeder Zeile zu: Befehl (function call), Objekt, Wert. | ||
|
||
```{r} | ||
Buchtitel <- c("Emma", "Stolz und Vorurteil", "Sinn und Sinnlichkeit") | ||
print(Buchtitel) | ||
Jahr <- c(1816, 1813, 1811) | ||
Jahr.num <- as.numeric(Jahr) | ||
``` | ||
|
||
|
||
|
||
1.2 Beschreibe, was in jeder Zeile passiert (in mind. einem Satz pro Zeile). | ||
|
||
```{r} | ||
Z <- c(1:42) # so könnt ihr Kommentare in den Code Chunk schreiben | ||
Z2 <- c(10, 48, 100:111, 1080) #mit oder ohne Leerzeichen nach dem Hashtag | ||
Z2 | ||
class(Z) | ||
Z_mean <- mean(Z) | ||
``` | ||
|
||
|
||
1.3 Finde den Fehler! | ||
|
||
```{r} | ||
Hunde_vektor <- c(Chihuahua, Dogge, Schäferhund, Border Collie) | ||
print(Hunde_vektor) | ||
``` | ||
|
||
```{r} | ||
Nummern_vektor <- (1,8,9, 13:29, 49, 92:129) | ||
mean(Nummern_vektor) | ||
``` | ||
|
||
```{r} | ||
Bsp.Zahlen <- c(1,8,9, 13:29, 31, "49", 92:129) | ||
sum(Bsp.Zahlen) | ||
``` | ||
|
||
```{r} | ||
Übung <- as.integer(c(1.3, 2.9, 1.7, 3.7, 7.3, 9.2)) | ||
print(Übung) | ||
``` | ||
|
||
|
||
## Übung 2: Objekte erstellen und Klassen anpassen | ||
2.1 Erstellt ein Objekt mit den Zahlen 1, 4 bis 11, 15 und 20 und nennt es `rdmZahlen`. | ||
2.2 Überprüft diesen Vektor auf seine Klasse. | ||
2.3 Ändert die Klasse zu `integer`. | ||
2.4 Erstellt daraus einen neuen `logical` Vektor, der die Information beinhaltet, ob die Zahlen aus `rdmZahlen` größer als 6 sind. | ||
|
||
## Übung 3: Vektoren | ||
|
||
Erstelle Vektoren mit folgenden Werten: | ||
- Kartoffeln: 8, -3, -4, 0, 8, -5, -2 | ||
- Eier: 10, -4, -2, -4, 10, -4, -2 | ||
- Zwiebeln: 12, -3, -1, -2, 0, -3, -1 | ||
- Wochentage: Montag bis Sonntag | ||
|
||
Ordnet danach die Wochentage den jeweiligen Vektoren zu. | ||
|
Oops, something went wrong.