extract characters 4,5,6,7 out of a string of 10 characters in one column and place them in another column in r

# Assuming the input string is stored in a variable called input_string
input_string <- "abcdefghij"

# Extract characters 4, 5, 6, 7
extracted_characters <- substr(input_string, 4, 7)

# Print extracted characters
print(extracted_characters)
243 chars
9 lines

related categories

gistlibby LogSnag