Description Usage Arguments Value Author(s) See Also Examples
View source: R/parseCharInput.R
The "parseCharInput" function converts a comma-seperated string into a vector by splitting the string along the commas. If "convertToNumeric" is true, the elements of the string will be converted into numbers and a numeric vector will be returned.
| 1 2 3 4 5 6 7 8 9 | 
| input | (Required) The string to be processed | 
| convertToNumeric | (Optional) A logical value. Should the input should be converted into numerics? TRUE by default | 
| sort | (Optional) A logical value. Should the resulting vector be sorted. FALSE by default | 
| expected | (Optional) The expected length of the output vector. No check is performed by default | 
| msg | (Optional) Error message to print if the input is not of the correct length specified by "expected". Default is "Wrong length" | 
| checkdup | (Optional) A logical value. Should an error be generated if there are any duplicated value? FALSE by default | 
| missingMsg | (Optional) Error message to print if the input is missing. Default is "Unknown" | 
| checkProb | (Optional) A logical value. Should the function check that the output vector sums to one? FALSE by default | 
| valid |  (Optional) A logical value. Should the  | 
A numeric vector or a character vector depending on the convertToNumeric flag.
Mike K Smith mstoolkit@googlemail.com
parseHashString uses parseCharInput sequentially. 
| 1 2 3 4 5 6 7 8 |   parseCharInput( "1,2,4")
  parseCharInput( "1,6,4", sort = TRUE )
 
  ## Not run: 
  ## see also the unit tests for more examples
  file.show( system.file( "Runit", "runit.supportfunctions.R" , package = "MSToolkit"))  
  
## End(Not run)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.