SCM

SCM Repository

[nbpmatching] Diff of /pkg/R/utils.R
ViewVC logotype

Diff of /pkg/R/utils.R

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 30, Wed Jan 13 22:17:45 2016 UTC revision 31, Mon Apr 18 22:37:08 2016 UTC
# Line 10  Line 10 
10  #'Calculate a name for each pair by using the ID columns from the matched data  #'Calculate a name for each pair by using the ID columns from the matched data
11  #'set.  Return a factor of these named pairs.  #'set.  Return a factor of these named pairs.
12  #'  #'
13  #'@aliases get.sets get.sets,data.frame-method  #'@aliases get.sets get.sets,data.frame-method get.sets,nonbimatch-method
14  #'@param matches A data.frame object.  Contains information on how to match the  #'@param matches A data.frame or nonbimatch object.  Contains information on
15  #'covariate data set.  #'how to match the covariate data set.
16  #'@param remove.unpaired A boolean value.  The default is to remove elements  #'@param remove.unpaired A boolean value.  The default is to remove elements
17  #'matched to phantom elements.  #'matched to phantom elements.
18  #'@param \dots Additional arguments, not used at this time.  #'@param \dots Additional arguments, not used at this time.
# Line 25  Line 25 
25  #'df.dist <- gendistance(df, idcol=1)  #'df.dist <- gendistance(df, idcol=1)
26  #'df.mdm <- distancematrix(df.dist)  #'df.mdm <- distancematrix(df.dist)
27  #'df.match <- nonbimatch(df.mdm)  #'df.match <- nonbimatch(df.mdm)
28    #'get.sets(df.match)
29  #'get.sets(df.match$matches)  #'get.sets(df.match$matches)
30  #'# include the phantom match  #'# include the phantom match
31  #'get.sets(df.match$matches, FALSE)  #'get.sets(df.match$matches, FALSE)
# Line 39  Line 40 
40      factor(f.sets)      factor(f.sets)
41  })  })
42    
43    setMethod("get.sets", "nonbimatch", function(matches, remove.unpaired=TRUE, ...) {
44        get.sets(matches$matches, remove.unpaired, ...)
45    })
46    
47  #'Calculate scalar distance  #'Calculate scalar distance
48  #'  #'
49  #'Calculate the scalar distance between elements of a matrix.  #'Calculate the scalar distance between elements of a matrix.

Legend:
Removed from v.30  
changed lines
  Added in v.31

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business Powered By FusionForge