Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- initialise <- function() {
- print("Pulling heroes list")
- heroestable <- readHTMLTable(getURLContent("http://dotabuff.com/heroes/winning", useragent = "Chrome 36.0.1944.0", followlocation = TRUE),stringsAsFactors = FALSE)[[1]] #[[1]] means grab only the 1st table
- names(heroestable) <- c("ID",names(heroestable)[-5]) #Columns are wrong; move all to right and set left-most to ID
- > dput(head(subsetheroes))
- structure(list(ID = c("", "", "", ""), Hero = c("Slardar", "Doom",
- "Bounty Hunter", "Chen"), `Win Rate` = c("52.32%", "49.10%",
- "45.29%", "44.34%"), `Matches Played` = c("2,741,067", "3,202,905",
- "4,146,758", "546,677"), `KDA Ratio` = c("2.42", "2.50", "2.17",
- "1.72"), `Wraith King` = c("-0.63%", "-3.57%", "-1.56%", "-0.27%"
- ), Abaddon = c("-2.16%", "1.72%", "-2.67%", "-0.51%"), Lich = c("-3.01%",
- "-0.74%", "-1.43%", "-1.35%"), Lycan = c("2.40%", "-3.12%", "0.51%",
- "-0.81%"), `Centaur Warrunner` = c("-0.75%", "0.03%", "-2.17%",
- "-0.24%"), Zeus = c("-3.29%", "-1.76%", "-3.33%", "-0.33%"),
- Necrophos = c("-1.93%", "-0.88%", "-2.19%", "0.03%"), `Death Prophet` = c("-1.83%",
- "-2.62%", "0.63%", "-1.33%"), Terrorblade = c("-1.35%", "-4.72%",
- "-1.13%", "-0.93%"), `Vengeful Spirit` = c("-1.65%", "-1.40%",
- "-2.03%", "-1.22%"), Omniknight = c("-1.79%", "0.77%", "-3.72%",
- "-0.45%"), Warlock = c("-1.65%", "-1.30%", "-0.39%", "-1.56%"
- ), Luna = c("-2.56%", "-2.31%", "-1.67%", "-0.44%"), Mirana = c("-1.19%",
- "0.20%", "1.16%", "1.71%"), Dazzle = c("-1.43%", "0.37%",
- "-1.19%", "0.30%"), `Treant Protector` = c("-0.18%", "-0.93%",
- "-1.98%", "-0.16%"), Viper = c("-1.03%", "-2.35%", "-1.37%",
- "-1.53%"), Venomancer = c("-3.87%", "-1.49%", "-2.21%", "0.67%"
- ), Riki = c("1.12%", "-3.32%", "0.97%", "-3.70%"), `Crystal Maiden` = c("-1.96%",
- "-0.56%", "-2.65%", "-0.74%"), Spectre = c("-0.59%", "1.40%",
- "-0.26%", "2.69%"), Ursa = c("1.02%", "-4.86%", "-1.45%",
- "-4.87%"), Axe = c("-1.55%", "0.89%", "-2.22%", "-1.62%"),
- `Witch Doctor` = c("-2.17%", "-1.32%", "-0.08%", "-0.67%"
- ), Bloodseeker = c("-0.07%", "-3.13%", "-3.57%", "-1.41%"
- ), Disruptor = c("-2.03%", "-0.20%", "-0.29%", "0.07%"),
- Slardar = c(NA, "-0.81%", "-3.60%", "-2.67%"), Silencer = c("-1.61%",
- "-0.37%", "0.72%", "1.13%"), Tidehunter = c("-3.59%", "0.88%",
- "-2.82%", "-0.11%"), `Shadow Shaman` = c("-2.50%", "-1.57%",
- "-1.50%", "-0.88%"), `Drow Ranger` = c("-0.90%", "-4.53%",
- "-0.09%", "-4.19%"), Sven = c("-1.46%", "-1.07%", "-1.74%",
- "-3.18%"), Phoenix = c("-1.72%", "0.61%", "-0.78%", "0.72%"
- ), Jakiro = c("-2.16%", "-0.66%", "-1.26%", "-2.20%"), `Ogre Magi` = c("-1.41%",
- "-0.49%", "-2.32%", "-1.45%"), Earthshaker = c("-2.12%",
- "0.25%", "-2.21%", "-1.48%"), `Ancient Apparition` = c("-1.88%",
- "0.05%", "0.31%", "-0.72%"), Brewmaster = c("-0.25%", "0.98%",
- "-0.69%", "-1.93%"), `Sand King` = c("0.75%", "0.51%", "-0.82%",
- "-1.91%"), Slark = c("-0.28%", "0.54%", "-2.14%", "-2.13%"
- ), `Phantom Lancer` = c("-0.05%", "-2.08%", "0.61%", "-1.61%"
- ), Weaver = c("0.78%", "0.66%", "1.32%", "-0.28%"), `Spirit Breaker` = c("0.85%",
- "-1.83%", "-2.49%", "-2.40%"), Sniper = c("-1.75%", "-2.20%",
- "-0.41%", "-1.89%"), Bristleback = c("0.90%", "0.49%", "-0.87%",
- "-1.63%"), Clockwerk = c("-2.69%", "0.29%", "-1.60%", "1.85%"
- ), `Keeper of the Light` = c("-0.77%", "0.05%", "-0.24%",
- "-0.59%"), `Night Stalker` = c("0.82%", "-2.31%", "-1.06%",
- "-2.69%"), Razor = c("-1.83%", "-1.80%", "-2.96%", "-2.92%"
- ), Doom = c("-0.21%", NA, "0.39%", "0.19%"), Invoker = c("-0.77%",
- "-1.87%", "1.14%", "1.20%"), Lion = c("-1.69%", "-0.26%",
- "-2.44%", "-1.64%"), `Nyx Assassin` = c("0.66%", "0.04%",
- "-0.11%", "-0.55%"), Juggernaut = c("-1.44%", "-0.69%", "-0.71%",
- "0.55%"), `Shadow Fiend` = c("-1.13%", "-0.89%", "0.44%",
- "-0.25%"), Medusa = c("-1.33%", "-1.12%", "-0.02%", "0.17%"
- ), `Elder Titan` = c("-2.21%", "-0.48%", "-0.00%", "0.93%"
- ), Kunkka = c("-0.20%", "1.17%", "0.53%", "-1.26%"), `Faceless Void` = c("1.28%",
- "0.56%", "-1.82%", "-1.57%"), Pudge = c("1.12%", "-0.78%",
- "-1.55%", "-0.25%"), Undying = c("-0.28%", "-0.98%", "0.96%",
- "-1.65%"), Pugna = c("-1.15%", "-0.96%", "-0.26%", "-0.86%"
- ), `Dark Seer` = c("-0.79%", "0.44%", "-1.07%", "0.09%"),
- Huskar = c("0.77%", "-2.60%", "-3.34%", "-3.43%"), `Dragon Knight` = c("-2.47%",
- "-1.06%", "-2.10%", "-2.43%"), `Ember Spirit` = c("-0.61%",
- "0.17%", "-0.28%", "0.78%"), Lifestealer = c("-0.33%", "-1.12%",
- "-0.52%", "-2.23%"), `Nature's Prophet` = c("0.75%", "-0.28%",
- "0.94%", "0.48%"), Enigma = c("-1.97%", "-0.57%", "-1.97%",
- "-0.64%"), Tusk = c("-0.15%", "-1.32%", "-1.78%", "-2.51%"
- ), Leshrac = c("-1.42%", "-0.70%", "-0.72%", "-0.70%"), Meepo = c("0.07%",
- "-3.51%", "-4.06%", "-1.50%"), Beastmaster = c("-0.87%",
- "-0.83%", "-1.31%", "-0.57%"), Lina = c("-1.53%", "-0.66%",
- "-1.78%", "-2.42%"), `Troll Warlord` = c("-0.45%", "-2.66%",
- "-1.95%", "-2.64%"), Tiny = c("-0.79%", "-0.13%", "-2.97%",
- "-1.26%"), Bane = c("-0.17%", "-0.54%", "-1.84%", "-1.44%"
- ), `Bounty Hunter` = c("2.00%", "-1.74%", NA, "-1.32%"),
- `Naga Siren` = c("-1.29%", "-0.18%", "-4.00%", "-2.28%"),
- Timbersaw = c("-0.95%", "0.71%", "-0.15%", "-0.67%"), `Templar Assassin` = c("1.47%",
- "-0.57%", "0.56%", "-0.84%"), Batrider = c("-1.31%", "-0.37%",
- "-1.01%", "-1.43%"), `Skywrath Mage` = c("-1.29%", "-1.64%",
- "-0.85%", "-0.74%"), `Chaos Knight` = c("-0.80%", "-2.83%",
- "-2.53%", "-2.08%"), Visage = c("-1.23%", "-1.08%", "-0.99%",
- "-1.24%"), `Legion Commander` = c("0.17%", "-0.81%", "-2.79%",
- "-1.06%"), `Storm Spirit` = c("-0.23%", "-0.15%", "-1.99%",
- "0.10%"), Rubick = c("-0.84%", "-0.09%", "-0.56%", "0.73%"
- ), Gyrocopter = c("-2.32%", "0.69%", "-0.16%", "-1.81%"),
- Magnus = c("-1.08%", "1.13%", "-1.79%", "-1.21%"), Clinkz = c("1.09%",
- "-2.47%", "1.77%", "-2.37%"), Chen = c("1.16%", "-1.58%",
- "-0.94%", NA), Puck = c("-1.70%", "0.68%", "-1.68%", "0.32%"
- ), `Outworld Devourer` = c("-2.36%", "-1.32%", "-1.68%",
- "-0.99%"), Windranger = c("-0.95%", "0.95%", "-0.92%", "-0.03%"
- ), `Lone Druid` = c("0.22%", "-2.41%", "-0.27%", "-0.34%"
- ), `Phantom Assassin` = c("0.54%", "-0.21%", "-2.05%", "-2.81%"
- ), Enchantress = c("-0.72%", "-0.59%", "-1.15%", "-1.60%"
- ), Tinker = c("-1.17%", "0.89%", "-1.54%", "0.41%"), Morphling = c("-0.19%",
- "-0.14%", "-1.56%", "0.33%"), `Queen of Pain` = c("-0.77%",
- "-0.42%", "-1.90%", "-1.19%"), Alchemist = c("0.90%", "-2.27%",
- "1.50%", "-0.16%"), `Shadow Demon` = c("-0.50%", "-0.69%",
- "-0.44%", "-1.17%"), `Anti-Mage` = c("2.49%", "-1.69%", "-0.84%",
- "-1.18%"), Io = c("0.05%", "-1.76%", "-1.67%", "0.05%"),
- Broodmother = c("3.19%", "-1.42%", "1.07%", "-3.50%"), `Earth Spirit` = c("-0.17%",
- "-1.18%", "-1.14%", "-1.29%")), .Names = c("ID", "Hero",
- "Win Rate", "Matches Played", "KDA Ratio", "Wraith King", "Abaddon",
- "Lich", "Lycan", "Centaur Warrunner", "Zeus", "Necrophos", "Death Prophet",
- "Terrorblade", "Vengeful Spirit", "Omniknight", "Warlock", "Luna",
- "Mirana", "Dazzle", "Treant Protector", "Viper", "Venomancer",
- "Riki", "Crystal Maiden", "Spectre", "Ursa", "Axe", "Witch Doctor",
- "Bloodseeker", "Disruptor", "Slardar", "Silencer", "Tidehunter",
- "Shadow Shaman", "Drow Ranger", "Sven", "Phoenix", "Jakiro",
- "Ogre Magi", "Earthshaker", "Ancient Apparition", "Brewmaster",
- "Sand King", "Slark", "Phantom Lancer", "Weaver", "Spirit Breaker",
- "Sniper", "Bristleback", "Clockwerk", "Keeper of the Light",
- "Night Stalker", "Razor", "Doom", "Invoker", "Lion", "Nyx Assassin",
- "Juggernaut", "Shadow Fiend", "Medusa", "Elder Titan", "Kunkka",
- "Faceless Void", "Pudge", "Undying", "Pugna", "Dark Seer", "Huskar",
- "Dragon Knight", "Ember Spirit", "Lifestealer", "Nature's Prophet",
- "Enigma", "Tusk", "Leshrac", "Meepo", "Beastmaster", "Lina",
- "Troll Warlord", "Tiny", "Bane", "Bounty Hunter", "Naga Siren",
- "Timbersaw", "Templar Assassin", "Batrider", "Skywrath Mage",
- "Chaos Knight", "Visage", "Legion Commander", "Storm Spirit",
- "Rubick", "Gyrocopter", "Magnus", "Clinkz", "Chen", "Puck", "Outworld Devourer",
- "Windranger", "Lone Druid", "Phantom Assassin", "Enchantress",
- "Tinker", "Morphling", "Queen of Pain", "Alchemist", "Shadow Demon",
- "Anti-Mage", "Io", "Broodmother", "Earth Spirit"), row.names = c(27L,
- 50L, 78L, 92L), class = "data.frame")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement