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: | 2024-12-09 06:46:25 UTC |
Source: | CRAN |
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.
Geschlecht
a factor with levels m
w
, giving the sex
Alter
a numeric vector
Gewicht
a numeric vector, giving the weight
Groesse
a 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.
Geschlecht
a factor with levels m
w
, giving the sex
Note
a 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.
Erfolg
a factor with levels 0
1
, giving success
Abschlussnote
a 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.
Name
a factor giving people's names
Geschlecht
a factor giving people's sex
Lieblingsfarbe
a factor giving people's colour
Einkommen
a 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.
Saison
the season
Spieltag
the matchday
Datum
Date of the match
Anpfiff
kick-off (Hour:Minute)
Heim
home-team's name
Gast
guest-team's name
Tore.Heim
home-team's goals at end of match
Tore.Gast
guest-team's goals at end of match
Tore.Heim.Halbzeit
home-team's goals at end of halftime
Tore.Gast.Halbzeit
guest-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.
ascore
scores of the assessment-instrument
arisk
definition 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.
PATID
patient id
ALTER
patient's age
SEX
patient's sex
STUFE
patient's "Pflegestufe"
MAHLZEIT
patient's meal (supper, breakfast, lunch)
ORT
place
SPEILAGE
describing, where the meal was parked
PATLAGE
describing where the patient was sitting or lying
PATPOSIT
patient's heading section
NAHRART
describing whether the meal was reduced to small pieces
HILF1
help-medium 1
HILF2
help-medium 2
HILF3
help-medium 3
HILF1HOW
quantity of help-mediums
TRUNK1
drink
TRUNK1ML
quantity of drinking (in ml)
TRUNK2
drink 2
TRUNK2ML
quantity of drinking (in ml)
PERSON
person giving food to patient
ZEIT
time, how long it took to give food
BREAK
describing whether there was a break
PORTION
describing 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.
PROBAND
ID
ALTER
age
GROESSE
height
GEWICHT
weight
BMI
Body-Mass-Index
HUEFTE
Hip circumference
SEX
proband's sex
RETEST
test or retest
KOPFTEIL
position of head section
RE30
pressure at sacral-bone-area while lying 30 degree to the right side
SCHU_RE
true angel assessed at right shoulder during 30 degree positioning to the right side
BECK_RE
true angel assessed at right pelvis during 30 degree positioning to the right side
LI30
pressure at sacral-bone-area while lying 30 degree to the left side
SCHU_LI
true angel assessed at right shoulder during 30 degree positioning to the left side
BECK_LI
true angel assessed at right pelvis during 30 degree positioning to the left side
MIKRO1A
pressure at sacral-bone-area while micro-positioning at right shoulder
MIKRO1B
pressure at sacral-bone-area while micro-positioning at right pelvis
MIKRO1C
pressure at sacral-bone-area while micro-positioning at left shoulder
MIKRO1D
pressure at sacral-bone-area while micro-positioning at left pelvis
MIKRO2A
pressure at sacral-bone-area while micro-positioning at right pelvis and shoulder
MIKRO2B
pressure 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)