Thanks for the help,
I tried to apply this to a vector with two columns, well I suppose it is not
a vector but for instance like this:
[,1] [,2]
[1,] 1 2
[2,] 2 3
[3,] 1 2
[4,] 1 2
[5,] 3 4
and return a vector :
1,2,1,1,3, so that it recognises both columns together.
I tried match(x, unique(x)) as earlier suggested but this returns a vector
of length 10 as opposed to 5, even though unique(x) does remove the repeated
rows.
Sorry if this is confusing, I am trying to do as originally posted but with
2 columns
Thanks
--
View this message in context:
http://r.789695.n4.nabble.com/Creating-vectors-tp2321440p2322646.html
Sent from the R help mailing list archive at Nabble.com.
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.