Concisely adding values in a loop to a column
It would be better to make a list of the parameters, 
and then use a loop to perform the assignments.
That will reduce the duplication of logic,
for example in the long grep(...).

params &lt;- list(
  c("/comp-a/", "a: spont-conv"),
  c("/comp-b/", "b: interv-ler-nl"),
  c("/comp-(c|d)/", "c/d: telefoon"),
  c("/comp-e/", "e: onderhandeling"),
  c("/comp-f/", "f: interv-radio-tv"),
  c("/comp-g/", "g: debat"),
  c("/comp-h/", "h: les"),
  c("/comp-i/", "i: spont-comm-radio-tv"),
  c("/comp-j/", "j: reportage-radio-tv"),
  c("/comp-k/", "k: nieuws-radio-tv"),
  c("/comp-l/", "l: comm-radio-tv"),
  c("/comp-m/", "m: misviering"),
  c("/comp-n/", "n: college"),
  c("/comp-o/", "o: voorgelezen")
)

placeholder &lt;- "PLACEHOLDER"
d$Register &lt;- placeholder

for (i in 1:length(params)) {
  pattern.i &lt;- params[[i]][1]
  label.i &lt;- params[[i]][2]
  d$Register[grep(pattern.i, d$Source)] &lt;- label.i
}

if (nrow(d[d$Register == placeholder]) &gt; 0) stop('Register is not assigned in some rows')


Some other minor improvements:


Simplified the regular expressions: pattern will match the same things as .*pattern.*
No need for the perl = T parameter in grep