I'd like to put together people from group 3 and group 4. How could I do that with R?
p.s. using RStudio and if you could give a bit of explanation on how and why doing it in a certain way, it would be amazing thank you
Hi Morello,
In the way that you helpfully provided an example of the sort of data you would start with. i.e.
could you similarly give an example of how the same would look after you applied the transformations you would like us to help you create ? It is ambigious to me what 'put together people from group 3 and group 4' might mean
Thank you Nirgrahamuk. I aologize for my bad phrasing, English is not my native language and I'm not used to programming language.
So basically what I would like to do is to get the participants that have value "3" and "4" under the variable "group" to all have value "3" with one line of coding (conceptually speaking is like opening tha data.frame in excel outside R, and assigning value "3" to all the subjects with value 4 in the column "Group")
Outcome should be:
subject Group variable
AAA 1 1.5
BBB 2 3.1
CCC. 3 3.9
DDD 3 1.2