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.

Revisions

  1. muneebhashmi7712 created this gist Jan 9, 2022.
    11 changes: 11 additions & 0 deletions adv-7.r
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    # 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)