EVOLUTION-MANAGER
Edit File: getFormParams.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: Extract parameters from a form query string</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 getFormParams {RCurl}"><tr><td>getFormParams {RCurl}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Extract parameters from a form query string</h2> <h3>Description</h3> <p>This function facilitates getting the parameter names and values from a URL that is an parameterized HTML query. </p> <p>This is motivated by a function from Chris Davis and Delft University. </p> <h3>Usage</h3> <pre> getFormParams(query, isURL = grepl("^(http|\\?)", query)) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>query</code></td> <td> <p>the query string or full URL containing the query</p> </td></tr> <tr valign="top"><td><code>isURL</code></td> <td> <p>a logical value. If <code>TRUE</code>, <code>query</code> is the full URL and we need to extract the sub-string representing the parameters. If <code>isURL</code> is <code>FALSE</code>, then <code>query</code> is assumed to be just the string containing the parameters. </p> </td></tr> </table> <h3>Value</h3> <p>A named character vector giving the parameter values The names are the parameter names. </p> <h3>Author(s)</h3> <p>Duncan Temple Lang </p> <h3>Examples</h3> <pre> if(url.exists("http://www.omegahat.net/foo/bob.R")) withAutoPrint({ getFormParams("http://www.omegahat.net/foo/bob.R?xyz=1&abc=verylong") getFormParams("xyz=1&abc=verylong") getFormParams("xyz=1&abc=&on=true") getFormParams("xyz=1&abc=") }) </pre> <hr /><div style="text-align: center;">[Package <em>RCurl</em> version 1.98-1.2 <a href="00Index.html">Index</a>]</div> </body></html>