Skip to content

Instantly share code, notes, and snippets.

View lucacarbonelc's full-sized avatar

Luca Carbone lucacarbonelc

View GitHub Profile
@lucacarbonelc
lucacarbonelc / chords + lyrics
Last active June 15, 2020 15:08
link chords to lyrics
library(chorrrds)
library(tidyverse)
# Functions ----------------------------------------------------------------
# Function to get rid of spaces
strip_it <- function(x){
ch_vector <- strsplit(x, "")[[1]]
ch_vector[c(grep("\\s", ch_vector)) ] <- ""
indx <- sapply(ch_vector, nchar)