dalgaard
Sent: Monday, June 3, 2024 5:02 AM
To: Shadee Ashtari
Cc: r-help@r-project.org
Subject: Re: [R] R code for overlapping variables -- count
[External Email]
If they are binary (0/1 dummies), can't you just "&" them as in
table(Female & USA & MidIncome)
(or sum()
If they are binary (0/1 dummies), can't you just "&" them as in
table(Female & USA & MidIncome)
(or sum() if you don't care about the number of 0s)
-pd
> On 2 Jun 2024, at 00:31 , Shadee Ashtari wrote:
>
> Hi!
>
> I am trying to find the code for how to get counts for intersectional
> varia
Às 18:40 de 02/06/2024, Rui Barradas escreveu:
Às 18:34 de 02/06/2024, Leo Mada via R-help escreveu:
Dear Shadee,
If you have a data.frame with the following columns:
n = 100; # population size
x = data.frame(
Sex = sample(c("M","F"), n, T),
Country = sample(c("AA", "BB", "US"), n,
Correcting a small glitch - see new code.
From: Leo Mada
Sent: Sunday, June 2, 2024 8:34 PM
To: Shadee Ashtari
Cc: r-help@r-project.org
Subject: [R] R code for overlapping variables -- count
Dear Shadee,
If you have a data.frame with the following columns:
n
Às 18:34 de 02/06/2024, Leo Mada via R-help escreveu:
Dear Shadee,
If you have a data.frame with the following columns:
n = 100; # population size
x = data.frame(
Sex = sample(c("M","F"), n, T),
Country = sample(c("AA", "BB", "US"), n, T),
Income = as.factor(sample(1:3, n, T)
On 2024-06-01 6:31 p.m., Shadee Ashtari wrote:
Hi!
I am trying to find the code for how to get counts for intersectional
variables. For example, I have three unique categorical variables --
"Female," "USA," and "MidIncome" -- and I'm trying to see how many people I
have at the intersection of th
6 matches
Mail list logo