52 Weeks of Data Science - Week 4

Solving problems, problems, and more problems

Published on

This past week was spent primarily solving Rosalind problems and getting more familiar with R. I’ve found that I need to do some reviewing of Math/Statistics. I’m feeling a bit rusty in that regard, and it’s holding me back on some of these problems.

Some notes

I figured it would be good to also note some common patterns/code that I’ve been using to solve these problems.

Reading lines in a plain text file

1
2
3
4
5
setwd("/path/to/working/directory")

con <- file("plain.txt")
data <- readLines(con)
close(con)

Splitting a string

1
2
library(stringr)
char_vector <- str_split(data, "")