powered by
str_count(x, pattern, sep)
x = "file_1:b:$:carbonate:c:dimethylsulfide:coccoliths:co2:aragonite:calcite:" str_count(x,pattern=":co2:",sep="")
Run the code above in your browser using DataLab