base R, stringi, and stringr: Benchmarking string manipulations with (CC282)
Автор: Riffomonas Project
Загружено: 13 мая 2024 г.
Просмотров: 1 115 просмотров
The phylotypr package does a lot of string manipulations using functions from base R. But are these the fastest options? This episode will compare base R string manipulations to those available in the stringi and stringr packages. We'll look at finding the length of strings, extracting substrings, replacing characters, and translating between character and base4 space. Wait until you see how much faster our code is after implementing the fastest versions of these operations! This episode is part of an ongoing effort to develop an R package that implements the naive Bayesian classifier.
If you want to get a physical copy of R Packages: https://amzn.to/43pMR8L
If you want a free, online version of R packages: https://r-pkgs.org/
You can find my blog post for this episode at https://www.riffomonas.org/code_club/....
Check out the GitHub repository at the:
Beginning of the episode: https://github.com/riffomonas/phyloty...
End of the episode: https://github.com/riffomonas/phyloty...
#rstats #refactor #testthat #tdd #microbenchmark #vectors #rdp #16S #classification #classifier #microbialecology #microbiome
Support Riffomonas by becoming a Patreon member!
/ riffomonas
Want more practice on the concepts covered in Code Club? You can sign up for my weekly newsletter at https://shop.riffomonas.org/youtube to get practice problems, tips, and insights.
If you're interested in purchasing a video workshop be sure to check out https://riffomonas.org/workshops/
You can also find complete tutorials for learning R with the tidyverse using...
Microbial ecology data: https://www.riffomonas.org/minimalR/
General data: https://www.riffomonas.org/generalR/
0:00 Introduction
7:31 Finding the length of a string
12:53 Retrieving substrings
24:11 Converting between upper and lower case
30:20 Replacing characters in a string
35:23 Converting from DNA sequences to base 4 sequences

Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: