I have a new problem with R - I am currently teaching myself how to use it for my bachelor thesis in Psychology, so bear with me if my questions are really naive.
Right now I am trying to create a new variable based on an already existing one. The existing one has 4 different expressions: T1, T2, T3 and T4. They may look something like this:
subject scenario
1 T1
2 T3
3 T3
4 T2
5 T2
6 T4
The new variable I am trying to create should give the following values: For T1
and T2
the new variable should be personal
and for T3
and T4
it should be impersonal
.
The output data should therefore look like this:
subject scenario personal force
1 T1 personal
2 T3 impersonal
3 T3 impersonal
4 T2 personal
5 T2 personal
6 T4 impersonal
What code can I create to do this? Any help would be greatly appreciated. Thanks!:)