Questions tagged [expss]

expss package provides tabulation functions with support for 'SPSS'-style labels, multiple / nested banners, weights, multiple-response variables and significance testing.

expss package provides tabulation functions with support for 'SPSS'-style labels, multiple / nested banners, weights, multiple-response variables and significance testing.

147 questions
1
vote
1 answer

R Programming: How to drop variable labels as first column name in the table output from the fre function of the expss package?

I'm doing exploratory analysis of survey data and the dataframe is a haven labelled dataset, that is, each variable already has value labels and variable labels. I want to store frequencies tables in a list, and then name each list element as the…
1
vote
1 answer

Expss call returns blank table

Attempting to call Expss from within a function. However it returns an empty table. s1_a<-c("a","b","b") s1_b<-c("a","a","b") df<-data.frame(s1_a,s1_b) multi<-function(v) { df %>% tab_cells(mrset_p("v")) %>% tab_stat_cpct() %>% tab_sort_desc()…
CK7
  • 229
  • 1
  • 11
1
vote
1 answer

How to generate Z-test including totals of variables in columns in expss?

Two questions in fact. How to add totals for variables in columns in expss? Is it possible to perform Z-test for variables in columns including total as a different category? Below you can find a piece of code I'd run but it didn't work... I mean…
Soren V. Raben
  • 179
  • 1
  • 14
1
vote
1 answer

Significance testing rows in expss package

Using the expss package, is it possible to run z-tests across 5 different binary variables? I figured out how to run significance testing on a single variable across different columns using the tab_cols argument, but I don't have any columns in this…
mansfin
  • 13
  • 3
1
vote
1 answer

expss Package into Markdown PDF

I cant seem to get the following code chunk to work in PDF markdown, it only works in HTML. I tried re-installing latex through tinytex, but still nothing is working. Here the following error I get: Error: ncol(obj1) is not NULL or ncol(obj2) is not…
1
vote
1 answer

R markdown contingency table %>% tabulate column variables with selective values

I am quite new to R, coming from Stata. Below is the r markdown chunk with reproducible data example. The data is representative to the data i am working with. But only with more binary (logical) and factor variables in number. The libraries and…
Mahm00d27
  • 17
  • 7
1
vote
1 answer

Weighted cumulative percents (ascending/descending) in expss tables

I would like to build tables of cumulative percentages using the expss package, including both ascending (0% -> 100%) and descending (100% -> 0%) orders. There is already an existing function (namely fre()) for ascending order, although the…
Maxence Dum.
  • 121
  • 1
  • 9
1
vote
1 answer

Weighting data and show blank cells "0" issue with expss R

I have codes below. It has not an error but when I weight the table with "tab_weight" it just effects inline rows. The total row numbers does not change. Total row numbers needs to change how can I do that? And the second thing is If there is in…
Hüseyin
  • 69
  • 11
1
vote
2 answers

Expss - using variable prefix to create set of variables for means table

Attempted to get package Expss to produce means tables from sets (in a similar way to multiple response tables, whereby you input a prefix common to all variable in the set). Here is my attempt to solve this below, but this script produces a table…
CK7
  • 229
  • 1
  • 11
1
vote
1 answer

Add and stack subgroups in a single expss table

A special request this time since a know how to get to my desired table output but would like to know if a less-wordy solution exists with expss. First off, this topic can be considered an extension of this discussion --> Complex tables with expss…
Maxence Dum.
  • 121
  • 1
  • 9
1
vote
1 answer

Conditional formatting in expss tables

My question can be considering an extension of the following discussion: R expss package: format numbers by statistic / apply different format to alternate rows I would like to understand the grammar of conditions to be able to write my own custom…
Maxence Dum.
  • 121
  • 1
  • 9
1
vote
1 answer

Compare two variables (both numeric or both factors) in expss tables

I am digging deeper and deeper into the expss package, and face one of the examples mentioned here --> https://gdemin.github.io/expss/#example_of_data_processing_with_multiple-response_variables (more particularly the last table of the…
Maxence Dum.
  • 121
  • 1
  • 9
1
vote
1 answer

Influence of subtotals on significance tests in expss tables

Hello to R/expss experts! This is a follow-up question to this one --> Complex tables with expss package. I added subtotals to already complex tables using the excellent expss package, and it works well for most tasks (counts, proportions,…
Maxence Dum.
  • 121
  • 1
  • 9
1
vote
1 answer

Complex tables with expss package

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…
Maxence Dum.
  • 121
  • 1
  • 9
1
vote
1 answer

How to properly parse (?) mdsets in expss within a loop?

I'm new to R and I don't know all basic concepts yet. The task is to produce a one merged table with multiple response sets. I am trying to do this using expss library and a loop. This is the code in R without a loop (works fine): #libraries #blah,…
Soren V. Raben
  • 179
  • 1
  • 14