CRAN Package Check Results for Package Lahman

Last updated on 2015-05-30 23:46:58.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 3.0-1 5.68 27.87 33.56 NOTE
r-devel-linux-x86_64-debian-gcc 3.0-1 5.52 28.50 34.02 NOTE
r-devel-linux-x86_64-fedora-clang 3.0-1 67.19 NOTE
r-devel-linux-x86_64-fedora-gcc 3.0-1 64.42 NOTE
r-devel-osx-x86_64-clang 3.0-1 71.83 NOTE
r-devel-windows-ix86+x86_64 3.0-1 11.00 41.00 52.00 NOTE
r-patched-linux-x86_64 3.0-1 5.52 27.90 33.42 NOTE
r-patched-solaris-sparc 3.0-1 449.30 NOTE
r-patched-solaris-x86 3.0-1 96.00 NOTE
r-release-linux-x86_64 3.0-1 5.62 28.48 34.10 NOTE
r-release-osx-x86_64-mavericks 3.0-1 NOTE
r-release-osx-x86_64-snowleopard 3.0-1 ERROR
r-release-windows-ix86+x86_64 3.0-1 12.00 46.00 58.00 NOTE
r-oldrel-windows-ix86+x86_64 3.0-1 15.00 41.00 56.00 NOTE

Check Details

Version: 3.0-1
Check: installed package size
Result: NOTE
     installed size is 7.5Mb
     sub-directories of 1Mb or more:
     data 7.2Mb
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-osx-x86_64-clang, r-devel-windows-ix86+x86_64, r-patched-linux-x86_64, r-patched-solaris-sparc, r-patched-solaris-x86, r-release-linux-x86_64, r-release-osx-x86_64-mavericks, r-release-osx-x86_64-snowleopard, r-release-windows-ix86+x86_64, r-oldrel-windows-ix86+x86_64

Version: 3.0-1
Check: dependencies in R code
Result: NOTE
    'library' or 'require' call to ‘plyr’ in package code.
     Please use :: or requireNamespace() instead.
     See section 'Suggested packages' in the 'Writing R Extensions' manual.
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-osx-x86_64-clang, r-devel-windows-ix86+x86_64, r-patched-linux-x86_64, r-patched-solaris-sparc, r-patched-solaris-x86, r-release-linux-x86_64, r-release-osx-x86_64-mavericks, r-release-osx-x86_64-snowleopard, r-release-windows-ix86+x86_64, r-oldrel-windows-ix86+x86_64

Version: 3.0-1
Check: package dependencies
Result: NOTE
    Package suggested but not available for checking: ‘ggplot2’
Flavor: r-release-osx-x86_64-snowleopard

Version: 3.0-1
Check: examples
Result: ERROR
    Running examples in ‘Lahman-Ex.R’ failed
    The error most likely occurred in:
    
    > ### Name: Batting
    > ### Title: Batting table
    > ### Aliases: Batting
    > ### Keywords: datasets
    >
    > ### ** Examples
    >
    > data(Batting)
    > head(Batting)
     playerID yearID stint teamID lgID G G_batting AB R H X2B X3B HR RBI SB CS
    1 aardsda01 2004 1 SFN NL 11 11 0 0 0 0 0 0 0 0 0
    2 aardsda01 2006 1 CHN NL 45 43 2 0 0 0 0 0 0 0 0
    3 aardsda01 2007 1 CHA AL 25 2 0 0 0 0 0 0 0 0 0
    4 aardsda01 2008 1 BOS AL 47 5 1 0 0 0 0 0 0 0 0
    5 aardsda01 2009 1 SEA AL 73 3 0 0 0 0 0 0 0 0 0
    6 aardsda01 2010 1 SEA AL 53 4 0 0 0 0 0 0 0 0 0
     BB SO IBB HBP SH SF GIDP G_old
    1 0 0 0 0 0 0 0 11
    2 0 0 0 0 1 0 0 45
    3 0 0 0 0 0 0 0 2
    4 0 1 0 0 0 0 0 5
    5 0 0 0 0 0 0 0 NA
    6 0 0 0 0 0 0 0 NA
    > require('plyr')
    Loading required package: plyr
    >
    > # calculate batting average and other stats
    > batting <- battingStats()
    >
    > # add salary to Batting data; need to match by player, year and team
    > batting <- merge(batting,
    + Salaries[,c("playerID", "yearID", "teamID", "salary")],
    + by=c("playerID", "yearID", "teamID"), all.x=TRUE)
    >
    > # Add name, age and bat hand information:
    > masterInfo <- Master[, c('playerID', 'birthYear', 'birthMonth',
    + 'nameLast', 'nameFirst', 'bats')]
    > batting <- merge(batting, masterInfo, all.x = TRUE)
    > batting$age <- with(batting, yearID - birthYear -
    + ifelse(birthMonth < 10, 0, 1))
    >
    > batting <- arrange(batting, playerID, yearID, stint)
    >
    > ## Generate a ggplot similar to the NYT graph in the story about Ted
    > ## Williams and the last .400 MLB season
    > # http://www.nytimes.com/interactive/2011/09/18/sports/baseball/WILLIAMS-GRAPHIC.html
    >
    > # Restrict the pool of eligible players to the years after 1899 and
    > # players with a minimum of 450 plate appearances (this covers the
    > # strike year of 1994 when Tony Gwynn hit .394 before play was suspended
    > # for the season - in a normal year, the minimum number of plate appearances is 502)
    > eligibleHitters <- subset(batting, yearID >= 1900 & PA > 450)
    >
    > # Find the hitters with the highest BA in MLB each year (there are a
    > # few ties). Include all players with BA > .400
    > topHitters <- ddply(eligibleHitters, .(yearID), subset, (BA == max(BA))|BA > .400)
    >
    > # Create a factor variable to distinguish the .400 hitters
    > topHitters$ba400 <- with(topHitters, BA >= 0.400)
    >
    > # Sub-data frame for the .400 hitters plus the outliers after 1950
    > # (averages above .380) - used to produce labels in the plot below
    > bignames <- rbind(subset(topHitters, ba400),
    + subset(topHitters, yearID > 1950 & BA > 0.380))
    > # Cut to the relevant set of variables
    > bignames <- subset(bignames, select = c('playerID', 'yearID', 'nameLast',
    + 'nameFirst', 'BA'))
    >
    > # Ditto for the original data frame
    > topHitters <- subset(topHitters, select = c('playerID', 'yearID', 'BA', 'ba400'))
    >
    > # Positional offsets to spread out certain labels
    > # NL TC JJ TC GS TC RH GS HH RH RH BT TW TW RC GB TG
    > bignames$xoffset <- c(0, 0, 0, 0, 0, 0, 0, 0, -8, 0, 3, 3, 0, 0, -2, 0, 0)
    > bignames$yoffset <- c(0, 0, -0.003, 0, 0, 0, 0, 0, -0.004, 0, 0, 0, 0, 0, -0.003, 0, 0) + 0.002
    >
    > require('ggplot2')
    Loading required package: ggplot2
    Warning in library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
     there is no package called ‘ggplot2’
    > ggplot(topHitters, aes(x = yearID, y = BA)) +
    + geom_point(aes(colour = ba400), size = 2.5) +
    + geom_hline(yintercept = 0.400, size = 1) +
    + geom_text(data = bignames, aes(x = yearID + xoffset, y = BA + yoffset,
    + label = nameLast), size = 3) +
    + scale_colour_manual(values = c('FALSE' = 'black', 'TRUE' = 'red')) +
    + ylim(0.330, 0.430) +
    + xlab('Year') +
    + scale_y_continuous('Batting average',
    + breaks = seq(0.34, 0.42, by = 0.02),
    + labels = c('.340', '.360', '.380', '.400', '.420')) +
    + geom_smooth() +
    + theme(legend.position = 'none')
    Error: could not find function "ggplot"
    Execution halted
Flavor: r-release-osx-x86_64-snowleopard