Package 'wikibooks'

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

Help Index


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".

Details

Package: wikibooks
Type: Package
Version: 0.2.1
Date: 2007-05-10
License: GPL version 2 or newer

Author(s)

Joerg Schlarmann (aka Produnis)

Maintainer: Joerg Schlarmann (aka Produnis) <[email protected]>

References

https://de.wikibooks.org/wiki/GNU_R


Calculation of a fictive graduation mark

Description

This function calculates a fictive graduation mark, which is set together by three grades. This is used in the Wikibook-Section "Programmierbeispiele"

Usage

Abschlussnote(x, y, z)

Arguments

x

The first grade

y

The second grade

z

The third grade

Author(s)

Joerg Schlarmann

References

https://de.wikibooks.org/wiki/GNU_R:_Programmierbeispiele

Examples

#Your three grades are 1.3, 1.7, 2.8
 Abschlussnote(1.3, 1.7, 2.8)

Datatable of Example 1

Description

This is a data-table, used in example 1

Usage

data(bsp1)

Format

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

Source

https://de.wikibooks.org/wiki/GNU_R:_Anwendungsbeispiele#Beispiel_1


Datatable of Example 2

Description

This is a data-table, used in example 2

Usage

data(bsp2)

Format

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

Source

https://de.wikibooks.org/wiki/GNU_R:_Anwendungsbeispiele#Beispiel_2


Datatable of Example 3

Description

This is a data-table, used in example 3

Usage

data(bsp3)

Format

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

Source

https://de.wikibooks.org/wiki/GNU_R:_Anwendungsbeispiele#Beispiel_3


Datatable of Example 4

Description

This is a data-table, used in example 4

Usage

data(bsp4)

Format

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

Source

https://de.wikibooks.org/wiki/GNU_R:_Anwendungsbeispiele#Beispiel_4


Results and fixtures of the german football-league "Bundesliga"

Description

This data-set contains the fixtures and results of the german football-league "Bundesliga" from 1963 - 2007.

Usage

data(Bundesliga)

Format

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

Source

fTip Database https://github.com/ftip


Show all matches of one team during one or all seasons

Description

This function (written for the "Bundesliga"-dataset) shows all matches of a selected team during one specific or all available seasons.

Usage

Bundesliga.Mannschaft(Mannschaft, Saison = "all")

Arguments

Mannschaft

a team (e.g. "FC Schalke 04")

Saison

a season (e.g. "2001/2002") or "all" for all season

Author(s)

produnis

References

fTip-Database https://github.com/ftip

See Also

Bundesliga.Tabelle

Examples

## 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")

Team-Rankings at matchday

Description

This function (written for the "Bundesliga"-dataset) shows team-rankings at specific matchdays of a season.

Usage

Bundesliga.Tabelle(Saison, Spieltag = 1, output = "Tabelle")

Arguments

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

Author(s)

produnis

References

fTip-Database https://github.com/ftip

See Also

Bundesliga.Mannschaft

Examples

## 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")

create an XML-file of all fixtures available in "Bundesliga"-dataset

Description

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().

Usage

Bundesliga.XML(Datei = "Bundesliga.xml", Saison = "all")

Arguments

Datei

filename, by default "Bundesliga.xml"

Saison

season to be included, by default "all" for all seasons

Author(s)

Joerg Schlarmann

See Also

sink

Examples

## 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)

Dataset of an assessment instrument

Description

A dataset ment to be used for the "sens.spec"-function of the wikibooks-package

Usage

data(cms)

Format

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)

Details

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.

Source

https://de.wikibooks.org/wiki/GNU_R:_Programmierbeispiele#Beispiel_2


How long does it take to give food in nursing home

Description

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

Usage

data(Essen.Zeit)

Format

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


pressure at sacral-bone: 30 degree vs. micro-positioning

Description

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

Usage

data(Mikrolagerung)

Format

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

Details

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.


sensitivity and specificity of an assessment instrument

Description

This function generates sensitivity and specificity for all possible cut-off-points of an assessment instrument using the assessment-scores.

Usage

sens.spec(x, y, risk = 1, dir = "LESS", plot = F)

Arguments

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

Author(s)

Produnis

References

https://de.wikibooks.org/wiki/GNU_R:_Programmierbeispiele#Beispiel_2

Examples

# Using the cms-Dataset
## Not run: sens.spec(cms$ascore, cms$arisk, risk=1)