EVOLUTION-MANAGER
Edit File: cksum.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Compute Check Sum</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for cksum {bitops}"><tr><td>cksum {bitops}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Compute Check Sum</h2> <h3>Description</h3> <p>Return a cyclic redundancy checksum for each element in the argument. </p> <h3>Usage</h3> <pre> cksum(a) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>a</code></td> <td> <p>coerced to character vector</p> </td></tr> </table> <h3>Details</h3> <p><code><a href="../../base/html/NA.html">NA</a></code>'s appearing in the argument are returned as <code>NA</code>'s. </p> <p>The default calculation is identical to that given in pseudo-code in the ACM article (in the References). </p> <h3>Value</h3> <p>numeric vector of the same length as <code>a</code>. </p> <h3>Author(s)</h3> <p>Steve Dutky <a href="mailto:sdutky@terpalum.umd.edu">sdutky@terpalum.umd.edu</a> </p> <h3>References</h3> <p>Fashioned from <code>cksum(1)</code> UNIX command line utility, i.e., <code>man cksum</code>. </p> <p>Dilip V. Sarwate (1988) Computation of Cyclic Redundancy Checks Via Table Lookup, <em>Communications of the ACM</em> <b>31</b>, 8, 1008–1013. </p> <h3>See Also</h3> <p><code><a href="bitShiftL.html">bitShiftL</a></code>, <code><a href="bitAnd.html">bitAnd</a></code>, etc. </p> <h3>Examples</h3> <pre> b <- "I would rather have a bottle in front of me than frontal lobotomy\n" stopifnot(cksum(b) == 1342168430) (bv <- strsplit(b, " ")[[1]]) cksum(bv) # now a vector of length 13 </pre> <hr /><div style="text-align: center;">[Package <em>bitops</em> version 1.0-6 <a href="00Index.html">Index</a>]</div> </body></html>