Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: applying if then else logic to a column in a data frame #1079
    sander69
    Member

    Thank you Bryan,
    I ended up using the following code, but I like your ifelse example better

    DOL1 <- which( DOL==0.0050 )
    DOL2 <- which( DOL==0.0100 )
    DOL3 <- which( DOL==0.0150 )
    DOL4 <- which( DOL==0.0200 )
    DOL5 <- which( DOL==0.0250 )
    DOL6 <- which( DOL==0.0300 )

    ShotData[DOL1,”DOL.lvl”] <- 0;
    ShotData[DOL2,”DOL.lvl”] <- 0;
    ShotData[DOL3,”DOL.lvl”] <- .5;
    ShotData[DOL4,”DOL.lvl”] <- .5;
    ShotData[DOL5,”DOL.lvl”] <- 1;
    ShotData[DOL6,”DOL.lvl”] <- 1;

Viewing 1 post (of 1 total)
Scroll to top
Privacy Policy