python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Create dummy variable for all neighborhood region depending on another dummy variable (sf object)
I have a spatial dataframe (sf) of all European NUTS2 regions. Within this sf object certain regions have a dummy = 1, and others a dummy = 0.
How can I create a new dummy (lets say "dummy_neighb...
Tom
Votes: 0
Answers: 1
Force rows to get a certain value on a dummy
I have a dataframe (lmr_sak) with verdicts from criminal cases in the Norwegian Court of Appeals from 1993-2019. On the 1st of October in 2015 a new criminal law (Straffeloven 2005 [not a typo, it too...
Torkel
Votes: 0
Answers: 2
How to select data and report a multinomial logistic regression for microbiome
recently I have been working with gut microbiome data, like abundance and its metabolic content (but for purposes of the question this may be indifferent). I'm inexpert in the field of multinomial log...
JP_SC
Votes: 0
Answers: 0
How to create a dummy variable that takes the value 1 if all values of a variable within a group exceed a certain value
I have a data set like the one below:
dat <- data.frame (id = c(1,1,1,1,1,2,2,2,2,2),
year = c(2015, 2016, 2017,2018, 2019, 2015, 2016, 2017, 2018, 2019),
rat...
Teo
Votes: 0
Answers: 1