Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
MeikeSteinhilber committed Jun 16, 2023
0 parents commit 10b349c
Show file tree
Hide file tree
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.
10 changes: 10 additions & 0 deletions .Rbuildignore
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$
1 change: 1 addition & 0 deletions .Rprofile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
source("renv/activate.R")
10 changes: 10 additions & 0 deletions .gitignore
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/
26 changes: 26 additions & 0 deletions DESCRIPTION
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/
4 changes: 4 additions & 0 deletions NAMESPACE
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)
16 changes: 16 additions & 0 deletions R/colorize.R
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
}
17 changes: 17 additions & 0 deletions R/external_functions.R
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")
}

5 changes: 5 additions & 0 deletions R/internal_functions.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

test_function <- function() {
print("Test successfull")
}

27 changes: 27 additions & 0 deletions README.Rmd
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)
```



9 changes: 9 additions & 0 deletions README.md
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 -->
52 changes: 52 additions & 0 deletions _pkgdown.yml
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



68 changes: 68 additions & 0 deletions idears/Aufgaben_2_Wiederholung.Rmd
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.

Loading

0 comments on commit 10b349c

Please sign in to comment.