Top "Strsplit" questions

strsplit is a function in R and MATLAB which splits the elements of a character vector around a given delimiter.

Split text based on dot in R

I have: "word1.word2" and I want: "word1" "word2" I know I have to use strsplit with perl=TRUE, but …

regex r strsplit
apply strsplit rowwise

Im trying to split a string on "." and create additional columns with the two strings before and after ".". tes<…

r strsplit
using strsplit and subset in dplyr and mutate

I have a data table with one string column. I'd like to create another column that is a subset of …

r dplyr strsplit
error in strsplit when trying to separate by a comma

I have the vector length # [1] 15,34, 12,24, 225, # Levels: 12,24, 15,34, 225, and I want to separate them by the comma to eventually make a list …

r strsplit
Separate "Name" into "FirstName" and "LastName" columns of data frame

I am struggling to figure out how to take a single column of "Name" in a dataframe split it into …

r strsplit
Add a function to Matlab path

I am trying to add the strsplit function to my MATLAB path, but I don't know how to do it. …

function matlab strsplit
R: splitting a numeric string

I'm trying to split a numeric string of 40 digits (ie. splitting 123456789123456789123456789 into 1 2 3 4 etc.) Unfortunately strsplit doesn't work as it requires …

string r strsplit
R extract first number from string

I have a string in a variable which we call v1. This string states picture numbers and takes the form …

regex r gsub strsplit
split string with regex

I'm looking to split a string of a generic form, where the square brackets denote the "sections" of the string. …

regex r strsplit
How to vectorize R strsplit?

When creating functions that use strsplit, vector inputs do not behave as desired, and sapply needs to be used. This …

r vectorization strsplit