The screenshot displays a spreadsheet with three variables.
I wish to add a fourth variable called "presence" filled with observations related to the column "segment".
For each of the observations in "segment" that start with the letter "c", the character "1" would be written in "presence".
On the other hand, "0" would be added for each observation in "segment" that starts with the letter "e".
As I am new to RStudio, I would appreciate your help to understand how to approach this task.