Last data update: 2014.03.03

R: The World Famous Baseball Data
baseballR Documentation

The World Famous Baseball Data

Description

These data come from the back-side of 59 baseball cards that Carrie had.

Usage

data(baseball)

Format

A data frame with 59 observations on the following 6 variables.

height

Height in inches

weight

Weight in pounds

bat

a factor with levels L R S

throw

a factor with levels L R

field

a factor with levels 0 1

average

ERA if the player is a pitcher and his batting average if the player is a fielder

Source

Hettmansperger, T.P. and McKean J.W. (2011), Robust Nonparametric Statistical Methods, 2nd ed., New York: Chapman-Hall.

Examples

data(baseball)
wilcox.test(height~field,data=baseball)
rfit(weight~height,data=baseball)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(Rfit)
Loading required package: quantreg
Loading required package: SparseM

Attaching package: 'SparseM'

The following object is masked from 'package:base':

    backsolve

> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/Rfit/baseball.Rd_%03d_medium.png", width=480, height=480)
> ### Name: baseball
> ### Title: The World Famous Baseball Data
> ### Aliases: baseball
> ### Keywords: datasets
> 
> ### ** Examples
> 
> data(baseball)
> wilcox.test(height~field,data=baseball)

	Wilcoxon rank sum test with continuity correction

data:  height by field
W = 686.5, p-value = 7.412e-05
alternative hypothesis: true location shift is not equal to 0

Warning message:
In wilcox.test.default(x = c(74L, 77L, 73L, 78L, 76L, 78L, 76L,  :
  cannot compute exact p-value with ties
> rfit(weight~height,data=baseball)
Call:
rfit.default(formula = weight ~ height, data = baseball)

Coefficients:
(Intercept)      height 
-228.571440    5.714286 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>