Try this:

#simulate your data frame
df&lt;-data.frame(code=c("P1F2I235R15C145","P24F1I12R124C96"),stringsAsFactors=FALSE)
#split the columns
cbind(df,do.call(rbind,regmatches(df$code,gregexpr("[PFIRC][0-9]+",df$code))))
#             code   1  2    3    4    5
#1 P1F2I235R15C145  P1 F2 I235  R15 C145
#2 P24F1I12R124C96 P24 F1  I12 R124  C96


What @AnandaMatho suggested in the comment was to let the letter in front of the code go away and name the columns accordingly. Something like that:

res&lt;-cbind(df,do.call(rbind,regmatches(df$code,gregexpr("(?&lt;=[PFIRC])[0-9]+",df$code,perl=TRUE))))
names(res)&lt;-c("Code","P","F","I","R","C")
#             Code  P F   I   R   C
#1 P1F2I235R15C145  1 2 235  15 145
#2 P24F1I12R124C96 24 1  12 124  96


How to split a string between two character into sub groups in R
Is there a word for the opposite condition of hypochondriasis? For example,  someone who denies being sick when they clearly are? I would just say that they are "in denial". Is there any other adequate word?

I thought about the obvious 'hyperchondria' but it doesn't seem to be used anywhere and doesn't look suitable as—from checking the origin of the word—just replacing 'hypo' by 'hyper' wouldn't fit well:


  1555–65;  &lt; Late Latin  &lt; Greek,  neuter plural of hypochóndrios  pertaining to the upper abdomen (supposed seat of melancholy), equivalent to hypo- hypo- + chóndr ( os ) ensiform cartilage + -ios  adj. suffix

