/fingerprint/man/mat.Rd

http://github.com/rajarshi/cdkr · Unknown · 40 lines · 39 code · 1 blank · 0 comment · 0 complexity · 4ff20ca34f27226cf8eea5286100602f MD5 · raw file

  1. \name{fp.to.matrix}
  2. \alias{fp.to.matrix}
  3. \title{
  4. Converts a List of Fingerprints to a Matrix
  5. }
  6. \description{
  7. In general, fingerprint data is read from a file or obtained via
  8. calls to an external generator and the return value is a list of fingerprints.
  9. This function takes the list and returns a matrix having number of rows equal to
  10. the number of fingerprints and the number of columns equal to the length of
  11. the fingerprint. Each element is 1 or 0 (1's being specified by the positions
  12. in each fingerprint vector)
  13. }
  14. \usage{
  15. fp.to.matrix(fplist)
  16. }
  17. \arguments{
  18. \item{fplist}{
  19. A list structure with each element being an object of class
  20. \code{fingerprint}. These will can be constructed by hand or
  21. read from disk via \code{\link{fp.read}}
  22. }
  23. }
  24. \value{
  25. A matrix with dimensions equal to \code{length(fplist), bit length)}
  26. where bit length is a property of the fingerprint objects in the list.
  27. }
  28. \seealso{
  29. \code{\link{distance}}, \code{\link{fp.read}}
  30. }
  31. \examples{
  32. # make fingerprint objects
  33. fp1 <- new("fingerprint", nbit=6, bits=c(1,2,5,6))
  34. fp2 <- new("fingerprint", nbit=6, bits=c(1,4,5,6))
  35. fp3 <- new("fingerprint", nbit=6, bits=c(2,3,4,5,6))
  36. fp.to.matrix( list(fp1,fp2,fp3) )
  37. }
  38. \keyword{logic}
  39. \author{Rajarshi Guha \email{rguha@indiana.edu}}