gistlib
main.r# assuming your data frame is named df and the column with the string is called old_col df$new_col <- substr(df$old_col, 1, 4) 128 chars4 lines
# assuming your data frame is named df and the column with the string is called old_col df$new_col <- substr(df$old_col, 1, 4)
gistlibby LogSnag