-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cf7f8da
commit 6646899
Showing
20 changed files
with
295 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,22 @@ | ||
Package: abd | ||
Type: Package | ||
Title: The Analysis of Biological Data | ||
Version: 0.1-12 | ||
Date: 2011-1-12 | ||
Version: 0.1-18 | ||
Date: 2011-02-22 | ||
Author: Kevin M. Middleton <[email protected]>, Randall Pruim | ||
<[email protected]> | ||
Maintainer: Kevin M. Middleton <[email protected]>, Randall Pruim | ||
<[email protected]> | ||
Maintainer: Kevin M. Middleton <[email protected]> | ||
Depends: R (>= 2.10), nlme, lattice, grid | ||
Suggests: boot, car, ggplot2, HH, plyr, vcd, Hmisc | ||
Description: The abd package contains data sets and sample code for the | ||
book, The Analysis of Biological Data by Michael Whitlock and | ||
Dolph Schluter (2009; Roberts & Company Publishers). | ||
Description: The abd package contains data sets and sample code for The | ||
Analysis of Biological Data by Michael Whitlock and Dolph | ||
Schluter (2009; Roberts & Company Publishers). | ||
License: GPL-2 | ||
LazyLoad: yes | ||
LazyData: yes | ||
Encoding: UTF-8 | ||
Repository: CRAN | ||
Repository/R-Forge/Project: abd | ||
Repository/R-Forge/Revision: 142 | ||
Date/Publication: 2011-01-26 08:24:30 | ||
Packaged: 2011-01-12 21:46:40 UTC; rforge | ||
Repository/R-Forge/Revision: 150 | ||
Date/Publication: 2011-04-05 07:14:39 | ||
Packaged: 2011-02-23 22:30:37 UTC; rforge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
as.xtabs <- function(x, ...) { UseMethod('as.xtabs') } | ||
|
||
as.xtabs.data.frame <- function(x, rowvar=NULL, colvar=NULL, labels=1, ...) { | ||
|
||
if (labels >= 1) { | ||
cnames <- names(x)[-1] | ||
m <- as.matrix(x[,-c(labels)]) | ||
} else { | ||
cnames <- names(x) | ||
m <- as.matrix(x) | ||
} | ||
|
||
rnames <- x[,labels] | ||
rownames(m) <- rnames | ||
if (! is.character(rowvar) ) { rowvar <- "variable.1" } | ||
if (! is.character(colvar) ) { colvar <- "variable.2" } | ||
|
||
dn <- list( rnames, cnames) | ||
names(dn) <- c(rowvar, colvar) | ||
attr(m,'dimnames') <- dn | ||
class(m) <- c('xtabs', 'table') | ||
return(m) | ||
} | ||
|
||
as.xtabs.matrix <- function(x, rowvar=NULL, colvar=NULL, ...) { | ||
rnames <- rownames(x) | ||
cnames <- colnames(x) | ||
rownames(m) <- rnames | ||
if (! is.character(rowvar) ) { rowvar <- "variable.1" } | ||
if (! is.character(colvar) ) { colvar <- "variable.2" } | ||
|
||
dn <- list( rnames, cnames) | ||
names(dn) <- c(rowvar, colvar) | ||
attr(m,'dimnames') <- dn | ||
class(m) <- c('xtabs', 'table') | ||
return(m) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
# Figure 17.8-3 but using LOESS rather than splines | ||
xyplot(length ~ age, ShrinkingSeals, cex=.5, alpha=.8, col.line='black', | ||
type=c('p','smooth'), span=.1, degree=2, eval=500 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.