I have the following list:
data=
{
{0, 106},
{1, 120},
{2, 116},
{3, 114},
{4, 130},
{5, 109}
}
I want to find the positions of the elements in data
that their first element (you might call it the first column) is larger than 2. So in this example the positions I am looking for are the last three:
{{4},{5},{6}}
The following, which makes use of levelspec, doesn't give a correct result:
Position[data, x_ /; x > 2, {2}]
(*{{1, 2}, {2, 2}, {3, 2}, {4, 2}, {5, 2}, {6, 2}, {7, 2}, {8, 2}, {9, 1}, {9, 2}, {10, 1}, {10, 2}, {11, 1}, {11, 2}}*)
Any idea how to perform this check?