expss

How to display results from only select subgroups + the whole data frame in an expss table?

纵饮孤独 提交于 2021-01-28 10:10:13
问题 Apologies for what is a pretty basic question... I am loving using the expss package for table creation, but am having trouble working through some of the output display. Specifically, I have a situation where my data frame contains a grouping variable as well as a few variables that will be summarized. I'd like to create output that displays certain summary statistics for each value of the subgroup in turn (each value of the grouping variable) plus the total for the whole sample. Something

R expss package: format numbers by statistic / apply different format to alternate rows

北战南征 提交于 2021-01-28 03:29:52
问题 I'm exploring the expss package in order to change SPSS completely for R. My standard tabels show counts and percentages in the rows, sometimes also complemented with additional statistics. Is there a way to change the number format by statistic or row? More concrete I would like to show the counts with 0 digits, percentages with 2 digits and ideally in % format and the means with 2 digits. I searched in htmlTables and htmlTable.etable {expss} but am not able to find a way to do this. Tx for

Changing Variable Labels in 'ctree' plot

两盒软妹~` 提交于 2020-12-15 07:19:09
问题 I'm struggling to try to make a CI tree from the 'party' package in R look presentable. So far this is what I have, in terms of cleaning the tree up. current version of tree What I would like to do is change the variable names on each individual node to something more descriptive and not just the shortened variable names used for coding. I tried changing the variable names themselves using the following code: colnames(dat.long.imp.m)[colnames(dat.long.imp.m)=="Gender"] <- "sex" Because some

Get value from cell in Shiny DataTable

此生再无相见时 提交于 2020-07-09 11:54:51
问题 I have this DataTable in Shiny and I would like to get the value from the first column in a variable textbox when I click an row. So in this case as seen in the screenshot, when I click this row, I would like to get Factuur Factuur in the place where now is Error: object of type 'closure' is not subsettable . I managed to get the row number: UI: p(verbatimTextOutput('chauffeurdetails')) Server: output$chauffeurdetails = renderText ({ chauffeurdetail = input$results_rows_selected }) Anyone

Complex tables with expss package

杀马特。学长 韩版系。学妹 提交于 2020-04-16 02:51:10
问题 Hello to all expss experts (@Gregory Demin, if you read this message!), after few days discovering this package, I achieved nice things but still struggle a bit to create complex crosstabs with the tab_* family of functions, especially to create combinations with significance tests. Let's start with an example given on the reference manual: library(expss) mtcars %>% tab_significance_options(keep = "none", sig_labels = NULL, subtable_marks = "greater", mode = "append") %>% tab_cols(total(), vs

Formatting tables in R Markdown to export to MS Word document

半城伤御伤魂 提交于 2020-02-05 13:59:30
问题 I've started using expss in R Markdown for generating tables with the help of Knitr. I would like to automate the tables and analysis for a report I need to prepare in Microsoft Word format. When knitting to HTML, the tables look wonderful. The tables in Word are displayed as rows of plain text and does not resemble a table. Does expss support exports of tables to Word? Are there instructions on how to do it? Tables generated with kable and dplyr display correctly in Word. However, I'm

How do you remove the cell label from your table?

柔情痞子 提交于 2020-01-24 22:11:47
问题 I'm trying to leverage expss to automate some reporting currently done in Excel via R. I'm generally needing to summarise a lot of values across some grouping (rows) relative to some fields (columns). I'm finding it difficult to get rid of the cell description. Here's an example: animals <- data.table( animal = c(1, 1, 2, 2, 3, 3, 4, 4), standing = c(1, 2, 1, 2, 1, 2, 1 ,2), height = c(50, 70, 75, 105, 25, 55, 10, 20) ) animals <- expss::apply_labels( animals, animal = "animal", animal = c(

`expss` and `data.table` not playing well together

徘徊边缘 提交于 2019-12-24 12:03:38
问题 I am working with the expss package to produce banner tables for survey data, but I keep getting an error that doesn't come up a lot on Google: Error in data.table(cell_var, col_var, row_var) : object '.R.listCopiesNamed' not found . I've created a reproducible example below. It's unclear to me if it's an error from expss or from data.table , or from the combination of the two. In any case there a way to override the need for '.R.listCopiesNamed' , or some other way to resolve the error? I'm

How to create count and percentage tables and linegraphs with 1 independent variable and 3 dependent ones

半世苍凉 提交于 2019-12-24 01:54:33
问题 I'm an R neophyte, and somehow this problem seems like it should be trivial to solve. But unfortunately, I haven't been able to do so after about three days of searching and experimenting. My data is in a form close to wideform: color agegroup sex ses red 2 Female A blue 2 Female C green 5 Male D red 3 Female A red 2 Male B blue 1 Female B ... I'm trying to create presentable tables with counts and percentages of the dependent variable ( color here) organized by sex , ses and agegroup . I

How do you remove empty rows and add descriptive columns?

一笑奈何 提交于 2019-12-12 16:56:08
问题 A follow-up question to this one Once I introduce some more complexity in my table, I'm seeing empty rows where no group-subgroup combination exists. Could those be remove? I'm also wanting to add a "descriptive" column which does not fit into the cell-row-column tabulation, could I do that? Here's an example: animals_2 <- data.table( family = rep(c(1, 1, 1, 1, 1, 1, 2, 2 ,2 ,3 ,3 ,3), 2), animal = rep(c(1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4), 2), name = rep(c(rep("fred", 3), rep("tod", 3), rep(