SHARE
TWEET

Untitled

a guest Oct 13th, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # checked
  2. cosmic_count <- function(cosmic) {
  3.     if(cosmic=="") {
  4.         0
  5.     } else {
  6.         sum(
  7.             as.numeric(
  8.                 unlist(
  9.                     strsplit(gsub("^ID=.*OCCURENCE=|\\([^,]+\\)", "", cosmic), ",")
  10.                 )
  11.             )
  12.         )
  13.     }  
  14. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top