how to substring in R from position

# Example string
example_string <- "Hello, World!"

# Define the starting position
start_position <- 8

# Use substring function to extract a substring from the specified position
result <- substring(example_string, start_position)

# Print the result
print(result)