r - Conditional string splitting -


My question is similar but, I need to divide by more than 2 columns I if the dataset column

< Pre> live cost ID gene_id location cost reed_cost cost

How do I get it different from four columns

  col1 col2 col3 col3 col4 I tried to resolve the link, it could not be found correct.   

  data & lt; - data.frame (v1 = c ("cost", "reed_cost", "# Your Data Library (Stringer) Wars" - str_split_fixed ($$ V1, "| _", max (str_count ($ d1 $ 1, "| _") (1), (x [x == ""], x [x! = ""]))) Names (Dat2) & lt; - paste0 ("cola", seq_len (dim (Dat2) [2]) # # col1 col2 col3 col4 # 1 Cost # 2 Reed cost # 3 Living cost # 4 Reed cost # 5 ID gene ID location  

Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -