Questions tagged [expss]

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

Filter by
Sorted by
Tagged with
4
votes
2answers
295 views

Passing multiple variable information inside R functions using string variable

Here is a reproducible example #install.packages("expss") library("expss") data(mtcars) mtcars = apply_labels(mtcars, mpg = "Miles/(US) gallon", cyl = "...
4
votes
2answers
845 views

Conditional Cross tabulation in R

Looking for the quickest way to achieve below task using "expss" package. With a great package of "expss", we can easily do cross tabulation (which has other advantage and useful functions for cross-...
4
votes
1answer
741 views

(RIM) weighting samples in R

I have some survey data. As an example, I use the credit data from the ÌSLR package. library(ISLR) The distribution of Gender in the data looks like this prop.table(table(Credit$Gender)) Male ...
3
votes
2answers
78 views

Add row in etable from expss R package

I want to add rows at specific place to expss output etable. I did that with some brute force method which always add the row at the start of etable. Any method to add rows at specific place. library(...
3
votes
3answers
79 views

How to create two headers table with expss

I have been reading about two headers table here and here with expss package, but the online code didn't work for me. My idea is to create a very similar table to this image: The dataframe is: df <...
3
votes
1answer
309 views

count_if (EXPSS) with multiple conditions in R

I am using expss::count_if. While something like this works fine (i.e., counting values only where value is equal to "1"): (number_unemployed = count_if("1",unemployed_field,na.rm = TRUE)), This ...
3
votes
1answer
23 views

How to drop unused value labels in crosstabulations table outputs using cro function from expss package?

I'm using heaven labelled dataframes (variables already have value labels when importing datasets). I need to run many crosstabulations of two variables. I’m using the cro function from expss package ...
3
votes
1answer
41 views

writing a user-defined function using expss::cro()

I'm trying to write a relatively simple user-defined function to output cross-tabulations, but not really sure why it is not running. My testdata: fp_within = structure(list(weight_cat.w1 = ...
3
votes
1answer
527 views

How to create weighted, labelled summary tables for both html and pdf?

I'd like to create large crosstables with summary statistics of multiple row variables by multiple column variables - and found two packages that make it very easy to beautiful large tables: the ...
3
votes
1answer
195 views

How to prevent R Expss from mixing variable name with row label in output data frame?

When running table using Expss package, the variable label gets mixed with each row in the dataframe (tables are output as dataframes). See code below. You will notice that each row label gets ...
3
votes
1answer
166 views

Count UNIQUE points within each grid box

I have the following data: EDIT: With smaller sample data dat <- structure(list(SN = c(198305L, 198305L, 198305L, 198305L, 198305L,198305L, 198305L, 198305L, 198305L, 198305L, 198305L, 198305L, ...
3
votes
0answers
44 views

Make column titles span over subgroups

Consider the following MWE: library(expss) library(openxlsx) data(mtcars) mtcars = apply_labels(mtcars, mpg = "Miles/(US) gallon", cyl = "...
3
votes
1answer
329 views

Formatting tables in R Marksdown using expss

I am having some troubles in formatting some tables using expss in an R Markdown. The output is a pdf file. knitr options are: knitr::opts_chunk$set(echo = FALSE, message = FALSE, warning = FALSE) ...
3
votes
0answers
78 views

Reorder columns of expss table

I wanting to arrange the tab_cols from the expss package. for example i want to order cols d,b,c from my test data set (below). Its seems cols are tabbed alphabetically.. test<-data.frame(group=c(...
3
votes
0answers
242 views

Removing HTML tag from DT datatable output

Trying to make a table in shiny using expss package however while downloading data, HTML tags are also coming in the column headers which should not be. can anyone please help here. #install....

15 30 50 per page
1
2 3 4 5
7