I want to count the frequency of paired value in two column, but I want to ignore the paired location. Such as the example below, the general aggregate or table function would reports three paired values (-0.25, 0.9), (0.9, -0.25) and (-0.77,2.9), but what I want to get is only two pairs which are (-0.25, 0.9) and (-0.77,2.9). How should I modify to only count the frequency of paired of value without considering the column location/names?
data <- data.frame(col1=c(-.25, 0.9, -.25, -.77, -.25),
col2=c(0.9, -.25, 0.9, 2.9, 0.9))