I have a row vector a.
a = c("Chemistry", "Chemistry", "Math","English","Math","Math","Physics","Physics","Chemistry")
Is there a quick and easy way to do this as follows?
c("Chemistry", NA, "Math","English","Math",NA,"Physics",NA,"Chemistry")
I tried diffand duplicateddid not get what I want.
source
share