as_perc | R Documentation |

`as_perc`

formats a proportion as a percentage to print in an RMarkdown
document

```
as_perc(p, digits = 0)
```

`p` |
A length-1 numeric to be interpreted as a proportion |

`digits` |
Number of digits to round percentage to (default to 0) |

Simply multiplies `p`

by 100 and affixes a percent sign to the end after
rounding.

Returns a string to report a percentage to the specified number of digits.

```
as_perc(0.2345)
as_perc(0.000234)
```

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.