how can I write this nesting code probably?

Social_class <- ifelse(test = so_cla==(“Lw”), yes = sample(x = c(“LwL”,”LwR”), size = 2, prob = c(0.64,0.36)), ifelse(test = so_cla==(“Uw”), yes = sample(x = c(“UwL”,”UwR”), size = 2, prob = c(0.64,0.36)), ifelse(test = so_cla==(“Lm”), yes = sample(x = c(“LmL”,”LmR”), size = 2, prob = c(0.49,0.51)), ifelse(test = so_cla==(“Um”) , yes = sample(x = c(“UmL”,”UmR”), size =…

Details

Test using async/await in truffle not working

I am using node v12.13.1, [email protected] and ubuntu 18.04 and running the test using documentation of async/await. https://www.trufflesuite.com/docs/truffle/testing/writing-tests-in-javascript#using-async-await This is my test code: const DappTokenSale = artifacts.require(“DappTokenSale”); const DappToken = artifacts.require(“DappToken”); contract(“DappToken”, async accounts => { let dapptokenInstance = await DappToken.deployed(); let dapptokenSale = await DappTokenSale.deployed(); let admin = accounts[0] console.log(admin) let buyer = accounts[1]…

Details