Posts by Andre Masuko • 11 points
1 post
-
1
votes0
answers237
viewsQ: Using the "as Numeric" function in Rstudio
Hello! I am trying to create a new binary variable to an existing database using the following code: leaders$warbefore <- as.numeric(leaders$interwarbefore == '1', leaders$civilwarbefore == '1')…