Skip to content

Instantly share code, notes, and snippets.

@muneebhashmi7712
Created January 9, 2022 14:43
Show Gist options
  • Select an option

  • Save muneebhashmi7712/acd11adbbfc5628d41317b645e2d0263 to your computer and use it in GitHub Desktop.

Select an option

Save muneebhashmi7712/acd11adbbfc5628d41317b645e2d0263 to your computer and use it in GitHub Desktop.
# Generate vector with pass and fail values of 40 students
result <- c(0, 0, 0, 1, 0, 0, 0, 0, 0, 1,
1, 0, 0, 0, 1, 1, 0, 0, 1, 0,
0, 0, 1, 0, 0, 1, 1, 0, 1, 1,
1, 1, 1, 0, 1, 1, 1, 1, 0, 1)
# Data Frame
df <- as.data.frame(cbind(IQ, result))
# Print data frame
print(df)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment