Dear R users,
I have data frame of 100 points. Now I want to create one new column (e.g. experiment) with first 50 row names "math" and last 50 row names "physics".
I am using
rep() but still not able to do that
data.frame(rep("math",100)) -> PB$experiment
The given code taking whole data points, it's not taking half 50
Could you please provide some information on that.