Marc Kupietz | 23daf5b | 2019-11-27 10:28:07 +0100 | [diff] [blame] | 1 | % Generated by roxygen2: do not edit by hand |
| 2 | % Please edit documentation in R/misc.R |
| 3 | \name{percent} |
| 4 | \alias{percent} |
| 5 | \title{Convert corpus frequency table of alternatives to percent} |
| 6 | \usage{ |
| 7 | percent(df) |
| 8 | } |
| 9 | \arguments{ |
| 10 | \item{df}{table returned from \code{\link{frequencyQuery}}} |
| 11 | } |
| 12 | \value{ |
| 13 | original table with converted columns \code{f}, \code{conf.low} and \code{conf.high} |
| 14 | } |
| 15 | \description{ |
| 16 | Convenience function for converting frequency tables of alternative variants |
| 17 | (generated with \code{as.alternatives=T}) to percent. |
| 18 | } |
| 19 | \examples{ |
Marc Kupietz | 05b2277 | 2020-02-18 21:58:42 +0100 | [diff] [blame^] | 20 | \donttest{ |
Marc Kupietz | 23daf5b | 2019-11-27 10:28:07 +0100 | [diff] [blame] | 21 | new("KorAPConnection") \%>\% |
| 22 | frequencyQuery(c("Tollpatsch", "Tolpatsch"), |
| 23 | vc=paste0("pubDate in ", 2000:2002), |
| 24 | as.alternatives = TRUE) \%>\% |
| 25 | percent() |
| 26 | } |
Marc Kupietz | 05b2277 | 2020-02-18 21:58:42 +0100 | [diff] [blame^] | 27 | } |