Skip to content

Commit

Permalink
version 0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason P. Sinnwell authored and gaborcsardi committed Aug 8, 1977
1 parent 46f53cb commit 94b05a3
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 11 deletions.
8 changes: 4 additions & 4 deletions DESCRIPTION
@@ -1,11 +1,11 @@
Package: ibdreg
Version: 0.1.0
Date: 2006-12
Version: 0.1.1
Date: 2007-1
Title: Regression Methods for IBD Linkage With Covariates
Author: Jason P. Sinnwell and Daniel J. Schaid
Maintainer: Jason P. Sinnwell <sinnwell@mayo.edu>
Description: A method to test genetic linkage with covariates by regression methods with response IBD sharing for relative pairs. Account for correlations of IBD statistics and covariates for relative pairs within the same pedigree.
License: Copyright 2003 Mayo Foundation for Medical Education and Research. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the GPL license, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. For other licensing arrangements, please contact Daniel J. Schaid. Daniel J. Schaid, Ph.D. Division of Biostatistics Harwick Building Room 775 Mayo Clinic 200 First St., SW Rochester, MN 55905. Phone: 507-284-0639 fax: 507-284-9542 email: schaid@mayo.edu.
Depends: R (>= 2.3.1)
Depends: R (>= 2.2.1)
URL: http://mayoresearch.mayo.edu/mayo/research/schaid_lab/software.cfm
Packaged: Fri Dec 1 10:54:48 2006; sinnwell
Packaged: Wed Jan 3 13:40:22 2007; sinnwell
28 changes: 21 additions & 7 deletions R/minpRows.q
@@ -1,8 +1,17 @@
#$Author: sinnwell $
#$Date: 2006/03/08 16:42:40 $
#$Header: /people/biostat3/sinnwell/Projects/IBDReg/Make/RCS/minpRows.q,v 1.1 2006/03/08 16:42:40 sinnwell Exp $
#$Date: 2007/01/03 19:01:37 $
#$Header: /people/biostat3/sinnwell/Projects/IBDReg/Make/RCS/minpRows.q,v 1.4 2007/01/03 19:01:37 sinnwell Exp $
#$Locker: $
#$Log: minpRows.q,v $
#Revision 1.4 2007/01/03 19:01:37 sinnwell
#re-add if statement in paste(), only places number if multiple rows
#
#Revision 1.3 2007/01/03 15:24:32 sinnwell
#re-entered deleted line of code assigning return.row
#
#Revision 1.2 2007/01/02 21:32:59 sinnwell
#enforce a non-null row.name parameter in data.frame
#
#Revision 1.1 2006/03/08 16:42:40 sinnwell
#Initial revision
#
Expand All @@ -22,16 +31,21 @@ minpRows <- function(obj, colnames=NULL, rowname=NULL, col.indx=ncol(obj)) {
## -allow row names to be given (repeat with numbers if multiple rows)
## -allow assignment of column names

n.cols <- ncol(obj)

if(length(colnames) != n.cols) colnames=1:n.cols
n.cols <- ncol(obj)

if(!nrow(obj) || !n.cols) {
warning("object has zero dimension")
return()
}

if(length(colnames) != n.cols) colnames=1:n.cols

indx <- which(obj[,col.indx]==min(obj[,col.indx], na.rm=TRUE))

rowlabels <- paste(rowname, if(length(indx)>1) 1:length(indx))
rowlabels <- if(!length(rowname)) 1:length(indx) else paste(rowname, if(length(indx)>1) 1:length(indx))

return.row <- data.frame(obj[indx,], row.names=rowlabels)

dimnames(return.row)[[2]] <- colnames
return.row

Expand Down

0 comments on commit 94b05a3

Please sign in to comment.