Description Usage Arguments Details Value Author(s) See Also Examples

These functions are used to demonstrate some of the debugging facilities in R.

1 2 3 4 | ```
asSimpleVector(x, mode = "logical")
convertMode(from, to)
setVNames(x, nm)
subsetAsCharacter(x, i, j)
``` |

`x` |
input |

`mode` |
the mode of |

`from` |
a parameter |

`to` |
another parameter |

`nm` |
names for |

`i` |
an index |

`j` |
another index |

A set of functions that can be used to demonstrate debugging principles and practices.

`asSimpleVector`

converts the argument `x`

to a simple R
vector of the given mode preserving names, dimension and dimnames.

`subsetAsCharacter`

calculates either a vector or a matrix subset of the
argument `x`

and returns the subset after converting it to be of
mode character. It uses `asSimpleVector`

to do the conversion to
character and thus also preserves any names, dimension or dimnames in the
subset.

`setVNames`

sets the names of the given vector `x`

to
the argument `nm`

and then converts `x`

to numeric
using `asSimpleVector`

.

`convertMode`

converts its first argument to
the mode of the second argument.

Various values are returned.

S. DebRoy

1 | ```
asSimpleVector(list(a = 1, b = 2), "character")
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.