Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 206736

count_if (EXPSS) with multiple conditions in R

$
0
0

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 does not (i.e., counting values only where value is equal to "1" or "2" or "3"):

(number_unemployed = count_if("1", "2", "3", unemployed_field,na.rm = TRUE)),

What is the correct syntax for using multiple conditions for count_if? I cannot find anything in the expss package documentation.


Viewing all articles
Browse latest Browse all 206736

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>