I have a huge xlsx file filled with keyword rankings and I need to calculate the visibility for the rankings. Excel can't handle such a large file, so I'm learning R.
Anyway, to calculate the visibility of a keyword, I need to have this formula:
Rank * % of search volume.
The % depends on the rank, whilst arbitrary I use:
1 - 90%
2 - 80%
3 - 70%
4 - 60%
5 - 50%
6 - 40%
7 - 30%
8 - 20%
9 - 10%
10 - 5%
11+ - 0%
When I could work in excel, I would have the above chart in a sheet, and do a vlookup of the rank, and * by the search volume. For example:
Keyword |rank |search volume |visibility
keyword1 |1 |1,000 |900
Keyword2 |5 |50,000 |25,000
Keyword3 |12 |3,500 |0
How would I go about doing this in R? I'm very new to R, have tried a few things with for loops but nothing has worked.
Thanks in advance