So, I currently added a new column to my dataframe. Now, I am needing to make the first 50 rows carry the value of "x" and the second 50 rows carry the value of "y."
My code so far is:
x_df$k <- c("x", "y")
Which gives me a new column but alternates the x and y values until it reaches 100.
So, I tried to do:
x_df$k <- head(x_df$k["x" = 50], tail(x_df$k["y" = 50]))
But, this gives me all "y" values for my k column.. Any tips are greatly appreciated