Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ,
- ,
- df[] <- lapply(df, function(i)as.numeric(gsub(',', '.', i)))
- do.call(cbind, lapply(split.default(df, gsub('\D+', '', names(df))), function(i) i[2] / i[1]))
- # SAMPLE1.AD SAMPLE2.AD
- #1 1.000000000 1.000000
- #2 0.004066052 0.001000
- #3 0.004117005 1.000000
- #4 0.499803347 0.496687
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement