Produces publication-ready tables with relevant statistics of interest for functions produced from the concurve package.

curve_table(data, levels, type = "c", format = "data.frame")

Arguments

data

Dataframe from a concurve function to produce a table for

levels

Levels of the consonance intervals or likelihood intervals that should be included in the table.

type

Indicates whether the table is for a consonance function or likelihood function. The default is set to "c" for consonance and can be switched to "l" for likelihood.

format

The format of the tables. The options include "data.frame" which is the default, "docx" (which creates a table for a word document), "pptx" (which creates a table for powerpoint), "latex", (which creates a table for a TeX document), and "image", which produces an image of the table.

See also

Examples

library(concurve) GroupA <- rnorm(500) GroupB <- rnorm(500) RandomData <- data.frame(GroupA, GroupB) intervalsdf <- curve_mean(GroupA, GroupB, data = RandomData, method = "default") (z <- curve_table(intervalsdf[[1]], format = "data.frame"))
#> Lower Limit Upper Limit Interval Width Interval Level (%) CDF P-value #> 2501 -0.015 0.025 0.039 25.0 0.625 0.750 #> 5001 -0.037 0.046 0.083 50.0 0.750 0.500 #> 7501 -0.066 0.076 0.142 75.0 0.875 0.250 #> 8001 -0.074 0.084 0.158 80.0 0.900 0.200 #> 8501 -0.084 0.094 0.177 85.0 0.925 0.150 #> 9001 -0.096 0.106 0.203 90.0 0.950 0.100 #> 9501 -0.116 0.126 0.241 95.0 0.975 0.050 #> 9751 -0.133 0.143 0.276 97.5 0.988 0.025 #> 9901 -0.154 0.164 0.318 99.0 0.995 0.010 #> S-value (bits) #> 2501 0.415 #> 5001 1.000 #> 7501 2.000 #> 8001 2.322 #> 8501 2.737 #> 9001 3.322 #> 9501 4.322 #> 9751 5.322 #> 9901 6.644
(z <- curve_table(intervalsdf[[1]], format = "latex"))
#> #> #> | | Lower Limit| Upper Limit| Interval Width| Interval Level (%)| CDF| P-value| S-value (bits)| #> |:----|-----------:|-----------:|--------------:|------------------:|-----:|-------:|--------------:| #> |2501 | -0.015| 0.025| 0.039| 25.0| 0.625| 0.750| 0.415| #> |5001 | -0.037| 0.046| 0.083| 50.0| 0.750| 0.500| 1.000| #> |7501 | -0.066| 0.076| 0.142| 75.0| 0.875| 0.250| 2.000| #> |8001 | -0.074| 0.084| 0.158| 80.0| 0.900| 0.200| 2.322| #> |8501 | -0.084| 0.094| 0.177| 85.0| 0.925| 0.150| 2.737| #> |9001 | -0.096| 0.106| 0.203| 90.0| 0.950| 0.100| 3.322| #> |9501 | -0.116| 0.126| 0.241| 95.0| 0.975| 0.050| 4.322| #> |9751 | -0.133| 0.143| 0.276| 97.5| 0.988| 0.025| 5.322| #> |9901 | -0.154| 0.164| 0.318| 99.0| 0.995| 0.010| 6.644|
(z <- curve_table(intervalsdf[[1]], format = "image"))
#> a flextable object. #> col_keys: `Lower Limit`, `Upper Limit`, `Interval Width`, `Interval Level (%)`, `CDF`, `P-value`, `S-value (bits)` #> header has 1 row(s) #> body has 9 row(s) #> original dataset sample: #> Lower Limit Upper Limit Interval Width Interval Level (%) CDF P-value #> 2501 -0.015 0.025 0.039 25 0.625 0.75 #> 5001 -0.037 0.046 0.083 50 0.750 0.50 #> 7501 -0.066 0.076 0.142 75 0.875 0.25 #> 8001 -0.074 0.084 0.158 80 0.900 0.20 #> 8501 -0.084 0.094 0.177 85 0.925 0.15 #> S-value (bits) #> 2501 0.415 #> 5001 1.000 #> 7501 2.000 #> 8001 2.322 #> 8501 2.737