Description Usage Arguments Value Examples

Turning a factor into a number is not trivial.
Using `as.numeric`

would only return to us the indicator numbers
and NOT the factor levels turned into a number.
fac2num simply turns a factor into a number, as we often need.

1 |

`x` |
an object. |

`force_integer` |
logical (FALSE). Should the values returned be integers? |

`keep_names` |
logical (TRUE). Should the values returned keep the names of the original vector? |

`...` |
ignored. |

if x is an object - it returns logical - is the object of class dendrogram.

1 2 3 | ```
x <- factor(3:5)
as.numeric(x) # 1 2 3
fac2num(x) # 3 4 5
``` |

dendextend documentation built on May 3, 2018, 5:04 p.m.

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.