| Title: | Functions and Datasets of the German WikiBook "GNU R" |
|---|---|
| Description: | The german Wikibook "GNU R" introduces R to new users. This package is a collection of functions and datas used in the german WikiBook "GNU R". |
| Authors: | Joerg grosse Schlarmann (aka Produnis) |
| Maintainer: | Joerg grosse Schlarmann (aka Produnis) <[email protected]> |
| License: | GPL (>= 2) |
| Version: | 0.2.1 |
| Built: | 2026-06-01 08:19:31 UTC |
| Source: | https://github.com/cran/wikibooks |
The german Wikibook "GNU R" introduces R to new users. This package is a collection of functions and datas used in the german WikiBook "GNU R".
| Package: | wikibooks |
| Type: | Package |
| Version: | 0.2.1 |
| Date: | 2007-05-10 |
| License: | GPL version 2 or newer |
Joerg Schlarmann (aka Produnis)
Maintainer: Joerg Schlarmann (aka Produnis) <[email protected]>
https://de.wikibooks.org/wiki/GNU_R
This function calculates a fictive graduation mark, which is set together by three grades. This is used in the Wikibook-Section "Programmierbeispiele"
Abschlussnote(x, y, z)Abschlussnote(x, y, z)
x |
The first grade |
y |
The second grade |
z |
The third grade |
Joerg Schlarmann
https://de.wikibooks.org/wiki/GNU_R:_Programmierbeispiele
#Your three grades are 1.3, 1.7, 2.8 Abschlussnote(1.3, 1.7, 2.8)#Your three grades are 1.3, 1.7, 2.8 Abschlussnote(1.3, 1.7, 2.8)
This is a data-table, used in example 1
data(bsp1)data(bsp1)
A data frame with 10 observations on the following 4 variables.
Geschlechta factor with levels m w, giving the sex
Altera numeric vector
Gewichta numeric vector, giving the weight
Groessea numeric vector, giving the height
https://de.wikibooks.org/wiki/GNU_R:_Anwendungsbeispiele#Beispiel_1
This is a data-table, used in example 2
data(bsp2)data(bsp2)
A data frame with 20 observations on the following 2 variables.
Geschlechta factor with levels m w, giving the sex
Notea numeric vector, giving the grade
https://de.wikibooks.org/wiki/GNU_R:_Anwendungsbeispiele#Beispiel_2
This is a data-table, used in example 3
data(bsp3)data(bsp3)
A data frame with 14 observations on the following 2 variables.
Erfolga factor with levels 0 1, giving success
Abschlussnotea numeric vector, giving the grade
https://de.wikibooks.org/wiki/GNU_R:_Anwendungsbeispiele#Beispiel_3
This is a data-table, used in example 4
data(bsp4)data(bsp4)
A data frame with 7 observations on the following 4 variables.
Namea factor giving people's names
Geschlechta factor giving people's sex
Lieblingsfarbea factor giving people's colour
Einkommena numeric vector, giving people's earnings
https://de.wikibooks.org/wiki/GNU_R:_Anwendungsbeispiele#Beispiel_4
This data-set contains the fixtures and results of the german football-league "Bundesliga" from 1963 - 2007.
data(Bundesliga)data(Bundesliga)
A data frame with 13406 observations on the following 10 variables.
Saisonthe season
Spieltagthe matchday
DatumDate of the match
Anpfiffkick-off (Hour:Minute)
Heimhome-team's name
Gastguest-team's name
Tore.Heimhome-team's goals at end of match
Tore.Gastguest-team's goals at end of match
Tore.Heim.Halbzeithome-team's goals at end of halftime
Tore.Gast.Halbzeitguest-team's goals at end of halftime
fTip Database https://github.com/ftip
This function (written for the "Bundesliga"-dataset) shows all matches of a selected team during one specific or all available seasons.
Bundesliga.Mannschaft(Mannschaft, Saison = "all")Bundesliga.Mannschaft(Mannschaft, Saison = "all")
Mannschaft |
a team (e.g. "FC Schalke 04") |
Saison |
a season (e.g. "2001/2002") or "all" for all season |
produnis
fTip-Database https://github.com/ftip
## select one season Bundesliga <- wikibooks::Bundesliga Bundesliga.Mannschaft("FC Schalke 04", "2006/2007") ## use all seasons Bundesliga <- wikibooks::Bundesliga Bundesliga.Mannschaft("FC Schalke 04") ## see a list of all teams of season 1993/1994: unique(Bundesliga$Gast[Bundesliga$Saison=="1993/1994"]) Bundesliga.Mannschaft("1. FC Nuernberg", "1993/1994")## select one season Bundesliga <- wikibooks::Bundesliga Bundesliga.Mannschaft("FC Schalke 04", "2006/2007") ## use all seasons Bundesliga <- wikibooks::Bundesliga Bundesliga.Mannschaft("FC Schalke 04") ## see a list of all teams of season 1993/1994: unique(Bundesliga$Gast[Bundesliga$Saison=="1993/1994"]) Bundesliga.Mannschaft("1. FC Nuernberg", "1993/1994")
This function (written for the "Bundesliga"-dataset) shows team-rankings at specific matchdays of a season.
Bundesliga.Tabelle(Saison, Spieltag = 1, output = "Tabelle")Bundesliga.Tabelle(Saison, Spieltag = 1, output = "Tabelle")
Saison |
the season, e.g. "1998/1999" |
Spieltag |
a matchday, e.g. 3 |
output |
use "Tabelle" if you want the teamrankings at the selected matchday. Use "Platzierung" for an overview of the team-rankings during the season |
produnis
fTip-Database https://github.com/ftip
## Showing the ranking at matchday 34 Bundesliga <- wikibooks::Bundesliga Bundesliga.Tabelle("1963/1964", 34, "Tabelle") ## Showing team-rankings for season 2006/2007 Bundesliga <- wikibooks::Bundesliga Bundesliga.Tabelle("2006/2007", output="Platzierung")## Showing the ranking at matchday 34 Bundesliga <- wikibooks::Bundesliga Bundesliga.Tabelle("1963/1964", 34, "Tabelle") ## Showing team-rankings for season 2006/2007 Bundesliga <- wikibooks::Bundesliga Bundesliga.Tabelle("2006/2007", output="Platzierung")
This function creates an XML-file of all fixtures available in the "Bundesliga"-dataset. By default, the XML-file is called "Bundesliga.xml" and is stored in your working directory using the function sink().
Bundesliga.XML(Datei = "Bundesliga.xml", Saison = "all")Bundesliga.XML(Datei = "Bundesliga.xml", Saison = "all")
Datei |
filename, by default "Bundesliga.xml" |
Saison |
season to be included, by default "all" for all seasons |
Joerg Schlarmann
## Not run: # this saves all season to file "Bundesliga.xml" Bundesliga.XML() #this writes only season 2001/2002 to "myfile.xml" Bundesliga.XML("myfile.xml", "2001/2002") ## End(Not run)## Not run: # this saves all season to file "Bundesliga.xml" Bundesliga.XML() #this writes only season 2001/2002 to "myfile.xml" Bundesliga.XML("myfile.xml", "2001/2002") ## End(Not run)
A dataset ment to be used for the "sens.spec"-function of the wikibooks-package
data(cms)data(cms)
A data frame with 620 observations on the following 2 variables.
ascorescores of the assessment-instrument
ariskdefinition whether "ascore" leads to positive group (1) oder negative group (0)
This dataset contains the scores of an assessment-instrument and whether the probands belong to positive or negative group. Data is ment to be used with the "sens.spec"-function of the wikibook-package.
https://de.wikibooks.org/wiki/GNU_R:_Programmierbeispiele#Beispiel_2
A datasset of a students "evidence based nursing project (ebnp)" with the question how long it takes to give food to patients in a nursing home
data(Essen.Zeit)data(Essen.Zeit)
A data frame with 63 observations on the following 22 variables.
PATIDpatient id
ALTERpatient's age
SEXpatient's sex
STUFEpatient's "Pflegestufe"
MAHLZEITpatient's meal (supper, breakfast, lunch)
ORTplace
SPEILAGEdescribing, where the meal was parked
PATLAGEdescribing where the patient was sitting or lying
PATPOSITpatient's heading section
NAHRARTdescribing whether the meal was reduced to small pieces
HILF1help-medium 1
HILF2help-medium 2
HILF3help-medium 3
HILF1HOWquantity of help-mediums
TRUNK1drink
TRUNK1MLquantity of drinking (in ml)
TRUNK2drink 2
TRUNK2MLquantity of drinking (in ml)
PERSONperson giving food to patient
ZEITtime, how long it took to give food
BREAKdescribing whether there was a break
PORTIONdescribing how much food was given
Dataset of a german students "evidence based nursing project (ebnp)" with the question what pressure at the sacral-bone-area can be measured using 30 degree and micro-positioning
data(Mikrolagerung)data(Mikrolagerung)
A data frame with 98 observations on the following 21 variables.
PROBANDID
ALTERage
GROESSEheight
GEWICHTweight
BMIBody-Mass-Index
HUEFTEHip circumference
SEXproband's sex
RETESTtest or retest
KOPFTEILposition of head section
RE30pressure at sacral-bone-area while lying 30 degree to the right side
SCHU_REtrue angel assessed at right shoulder during 30 degree positioning to the right side
BECK_REtrue angel assessed at right pelvis during 30 degree positioning to the right side
LI30pressure at sacral-bone-area while lying 30 degree to the left side
SCHU_LItrue angel assessed at right shoulder during 30 degree positioning to the left side
BECK_LItrue angel assessed at right pelvis during 30 degree positioning to the left side
MIKRO1Apressure at sacral-bone-area while micro-positioning at right shoulder
MIKRO1Bpressure at sacral-bone-area while micro-positioning at right pelvis
MIKRO1Cpressure at sacral-bone-area while micro-positioning at left shoulder
MIKRO1Dpressure at sacral-bone-area while micro-positioning at left pelvis
MIKRO2Apressure at sacral-bone-area while micro-positioning at right pelvis and shoulder
MIKRO2Bpressure at sacral-bone-area while micro-positioning at left pelvis and shoulder
While lying in bed, pressure is the main reason why patients get a pressure-ulcer. The aim of this EBNP was to get knowledge about how pressure differs during various positionings. The probands where positioned to the left and to the right side by 30 degrees while lying in a bed. Each time, the pressure at the sacral-bone-area was measured, as at this area a pressure-ulcer arises very often. After that, pressure was assessed while probands where positioned by micro-positioning at left and right shoulder and pelvis.
This function generates sensitivity and specificity for all possible cut-off-points of an assessment instrument using the assessment-scores.
sens.spec(x, y, risk = 1, dir = "LESS", plot = F)sens.spec(x, y, risk = 1, dir = "LESS", plot = F)
x |
score of an assessment-instrument (numeric) |
y |
a factor which classify x to positive or negative group |
risk |
y-value for the positive group (e.g. 1 or "y")) |
dir |
"LESS" if a low (x) leads to positive group; "GREATER" whether a high (x) leads to positive group |
plot |
logical whether a plot should be generated |
Produnis
https://de.wikibooks.org/wiki/GNU_R:_Programmierbeispiele#Beispiel_2
# Using the cms-Dataset ## Not run: sens.spec(cms$ascore, cms$arisk, risk=1)# Using the cms-Dataset ## Not run: sens.spec(cms$ascore, cms$arisk, risk=1)