set.seed(1)
simdata(n=4, x2binary=TRUE)
# y x1 x2 x3 x4
# 1 -0.06399616 -1.23307320 2 -0.6521442 1.6141842
# 2 1.00822173 -0.05167026 1 0.4659907 0.5421826
# 3 2.87886825 0.43816687 1 1.5217240 0.2808691
# 4 0.79129101 -0.72510640 1 0.7342611 0.1820001
Run the code above in your browser using DataLab