<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/evaluating-olive-mcbride-with-the-arkham-horror-lcg-chaos-bag-simulator-in-r/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://ntguardian.wordpress.com/2018/08/13/evaluating-olive-mcbride-arkham-horror-lcg-chaos-bag-simulator-r/"> R – Curtis Miller's Personal Website</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>(If you care, there may be spoilers in this post.)</p>
<h2>Introduction</h2>
<p>I <em>love</em> <a rel="nofollow" href="https://www.fantasyflightgames.com/en/products/arkham-horror-the-card-game/" target="_blank">Arkham Horror; The Card Game</a>. I love it more than I really should; it’s <em>ridiculously</em> fun. It’s a cooperative card game where you build a deck representing a character in the <a rel="nofollow" href="https://en.wikipedia.org/wiki/Cthulhu_Mythos" target="_blank">Cthulhu mythos</a> universe, and with that deck you play scenarios in a narrative campaign<sup><a rel="nofollow" href="https://ntguardian.wordpress.com/2018/08/13/evaluating-olive-mcbride-arkham-horror-lcg-chaos-bag-simulator-r/#fn-3304-1" target="_blank">1</a></sup> where you grapple with the horrors of the mythos. Your actions in (and between) scenarios have repercussions for how the campaign plays out, changing the story, and you use experience points accumulated in the scenarios to upgrade your deck with better cards.</p>
<p><span></span></p>
<p>The game is hard. <em>Really</em> hard. And I don’t mean it’s hard because it has a learning curve (although if you’re not used to deep games like this, it probably does have a learning curve). This is a Cthulhu game, which means that the mythos is going to do everything to beat you down. Your best-laid plans are going to get derailed. The worst thing that could possibly happen to you <em>will</em> happen. This is why this game is unreasonably fun: it’s a game for masochists.</p>
<p>And it makes a damn ton of good stories. I often want to tell the tale of how amazingly awful the events played out, or how I just snatched victory out of the jaws of defeat. Bloomberg recently published <a rel="nofollow" href="https://www.bloomberg.com/news/articles/2018-04-26/wall-street-s-latest-trend-in-networking-board-game-nights" target="_blank">an article about the rise of board games in companies</a>. If you’re in one of these companies where employees often play board games together after hours, you should consider adding Arkham Horror (the card game; I’ve never played the board game and I’ve heard mixed reviews) to the mix. It’s a great team builder.</p>
<p>Two elements make Arkham Horror so damn hard and unpredictable: the encounter deck and the chaos bag. The encounter deck is a deck that all players draw from every turn that spawns monsters and awful events. The chaos bag is used for skill test you make for advancing your board state. You draw tokens from the chaos bag, add the modifier of the revealed token to your skill value for that skill test (most of them are negative numbers), check the new value against the difficulty of the test, and if your modified skill value is at least as great as the difficulty of the test, you pass; otherwise, you fail. (You can pitch cards from your hand to increase your skill value <em>before</em> you reveal a token.)</p>
<p><img alt="Chaos bag tokens" src="https://ntguardian.files.wordpress.com/2018/08/arkham2.jpg?w=456" data-recalc-dims="1"><br>
*(Image source: <a rel="nofollow" href="https://arstechnica.com/gaming/2017/04/the-arkham-horror-card-game-you-got-some-rpg-in-my-ccg/" target="_blank">Ars Technica</a>)</p>
<p>This is the chaos bag in a nutshell, but the chaos bag does more. The elder sign token represents good luck and often helps your board state; it’s considered a great success. But most icon tokens in the bag are trying to hurt you. There are four icon tokens: the skulls, the cultist, the tablets, and the elder things. These often not only apply a modifier but do something bad to you (which changes between scenarios).</p>
<p>And of course there’s this little bastard.</p>
<p><img alt="Autofail" src="https://ntguardian.files.wordpress.com/2018/08/ahautofail.jpg?w=456" data-recalc-dims="1"></p>
<p>This is the auto-fail token. You just fail. Thanks for playing.</p>
<h2>Simulating the Chaos Bag</h2>
<p>Bad things happen in Arkham Horror. Sometimes, though, they feel like they happen a lot. For example, you can draw two auto-fails in a row. Or three. I cannot understate how devastating that can be in a game. Sometimes it feels like this happens a lot. Sometimes it feels like this particular game went unusually poorly, and unusually poor games seem to happen frequently.</p>
<p>That’s a contradiction, of course. I think that this sense of bad games happening often emerges from humans fundamentally poor understanding of probability and how it actually works. I’m not just referring to the mathematics; people’s intuition of what should happen according to probability does not match what probability says happens. This phenomenon is well-documented (see, for example, the book <a rel="nofollow" href="https://www.amazon.com/Irrationality-Enemy-Within-Stuart-Sutherland/dp/1780660251" target="_blank"><em>Irrationality</em>, by Stuart Sutherland</a>) and is one of the explanations for why people seemed to underestimate Donald Trump’s chances of winning the 2016 election (in short, unlikely events occur more frequently than people perceive; see also <a rel="nofollow" href="https://fivethirtyeight.com/features/the-real-story-of-2016/" target="_blank">Nate Silver’s series of articles</a>). In fact, you are more likely to find <em>any</em> pattern than no pattern at all (and in Arkham Horror, patterns are usually bad for you.)</p>
<div><iframe allowfullscreen="true" src="https://www.youtube.com/embed/88_C-fogY40?version=3&rel=1&%23038;fs=1&%23038;autohide=2&%23038;showsearch=0&%23038;showinfo=1&%23038;iv_load_policy=1&%23038;wmode=transparent" width="450" type="text/html"></iframe></div>
<p>This perception of “unusually many auto-fails” (which, as a statistician, I know cannot be right no matter what my feelings say) prompted me to write an R function that generates a string of pulls from the chaos bag, each pull independent of the previous pull. Here’s the function:</p>
<pre>
chaos_bag_string_sim &lt;- function(dicebag = list('E' = 1,  # Elder Sign
                                                'P' = 1,  # +1
                                                '0' = 2,
                                                '1' = 3,  # -1
                                                '2' = 2,  # -2
                                                '3' = 1,
                                                '4' = 1,
                                                'S' = 2,  # Skull
                                                'C' = 1,  # Cultist
                                                'T' = 1,  # Tablet
                                                'L' = 1,  # Elder Thing
                                                'A' = 1), # Autofail
                                 n = 24, replace = TRUE) {
  paste0(sample(names(dicebag), replace = replace,
                prob = as.vector(unlist(dicebag)),
                size = n), collapse = '')
}
</pre>
<p>Notice that the function takes a list, <code>dicebag</code>. This list uses one-character codes representing chaos bag tokens, and the actual contents of the list are numbers representing the frequency of that token in the bag. The bag that serves as a default is a fictitious chaos bag that I believe is representative of Arkham Horror on standard difficulty. Since most numbered tokens are negative, I denote the +1 token with <code>'P'</code> and the negative tokens with their numbers.</p>
<p>How many pulls from the bag occur in a game? That's really hard to figure out; in fact, this will vary from scenario to scenario dramatically. So let's just make an educated guess to represent the &quot;typical&quot; game. A round consists of a mythos phase, then three actions per player, followed by a monsters phase and an upkeep phase. The mythos phase often prompts skill tests, and I would guess that the average number of skill tests made during each player's turn is two. We'll guess that about half of the draws from the encounter deck prompt skill tests. A game may last about 16 rounds. This adds up to about 40 skill tests per player per game. As a consequence, a four-player game (I mostly play multiplayer, and the more the merrier) would yield 160 skill tests.</p>
<p>Let's simulate a string of 160 skill tests, each independent of the other<sup><a rel="nofollow" href="https://ntguardian.wordpress.com/2018/08/13/evaluating-olive-mcbride-arkham-horror-lcg-chaos-bag-simulator-r/#fn-3304-2" target="_blank">2</a></sup>.</p>
<pre>
(game &lt;- chaos_bag_string_sim(n = 160))
</pre>
<pre>
[1] &quot;311113E12121E2LS20A32A4ETT1SE3T3P0AT2S12PLSC033CP22A11CLL31L024P12ES24A1S0E
     E3PSSS12C13T21224104L43PCT13TTCSSASE20SA1TT2SSC2CPC20012CC41S234PPEP101E0LS
     1P1110TSS1&quot;
</pre>
<p>I represented pulls from the chaos bag as a string because we can use <a rel="nofollow" href="https://en.wikipedia.org/wiki/Regular_expression" target="_blank">regular expressions</a> to find patterns in the string. For instance, we can use the expression <code>AA</code> to find all occurances of double-auto-fails in the string.</p>
<pre>
grepl(&quot;AA&quot;, game)
</pre>
<pre>
[1] FALSE
</pre>
<p>The <code>grepl()</code> function returns a boolean (logical) value identifying whether the pattern appeared in the string; in this game, no two auto-fails appeared in a row.</p>
<p>What about two auto-fails appearing, separated by two other tests? This is matched by the expression <code>A..A</code> (remember, <code>.</code> matches any character).</p>
<pre>
grepl(&quot;A..A&quot;, game)
</pre>
<pre>
[1] TRUE
</pre>
<p>We can take this further and use our simulator to estimate the probability events occur. After all, in probability, there are two ways to find the probability of events:</p>
<ol>
<li>Create a probability model and use mathematics to compute the probability an event of interest occurs; for example, use a model of a die roll to compute the probability of rolling a 6</li>
<li>Perform the experiment many times and count how many times the event occured in these experiments many times and count how often the event of interest occured; for example, roll a die 1000 times and count how many times it rolled a 6 (this is usually done on a computer)</li>
</ol>
<p>While the latter approach produces estimates, these estimates are guaranteed to get better the more simulations are performed. In fact, if you want at least a 95% chance of your estimate being accurate up to two decimal places, you could perform the simulation 10,000 times.<sup><a rel="nofollow" href="https://ntguardian.wordpress.com/2018/08/13/evaluating-olive-mcbride-arkham-horror-lcg-chaos-bag-simulator-r/#fn-3304-3" target="_blank">3</a></sup></p>
<p>Using this, we can estimate the probability of seeing two auto-fails in a row.</p>
<pre>
mean(grepl(&quot;AA&quot;, replicate(10000, {chaos_bag_string_sim(n = 160)})))
</pre>
<pre>
[1] 0.4019
</pre>
<p>There's about a 40% chance of seeing two auto-fail tokens in a single four-player game. That's pretty damn likely.</p>
<p>Let's ask a slightly different question: what is the average number of times we will see two autofails in a row in a game? For this we will want to dip into the <strong>stringr</strong> package, using the <code>str_count()</code> function.</p>
<pre>
library(stringr)

str_count(game, &quot;AA&quot;)
</pre>
<pre>
[1] 0
</pre>
<pre>
str_count(game, &quot;A..A&quot;)  # How many times did we see auto-fails separated by two
                         # tests?
</pre>
<pre>
[1] 1
</pre>
<p>Or we can ask how often we saw three &quot;bad&quot; tokens in a row. In Arkham Horror on standard difficulty, players often aim to pass a test when drawing a -2 or better. This means that &quot;bad&quot; tokens include -3, -4, auto-fail, and often the tablet and elder thing tokens, too. The regular expression pattern that can match &quot;two bad things in a row&quot; is <code>[34TLA]{2}</code> (translation: see either <code>3</code>, <code>4</code>, <code>T</code>, <code>L</code>, or <code>A</code> exactly two times).</p>
<pre>
str_count(game, &quot;[34TLA]{2}&quot;)
</pre>
<pre>
[1] 14
</pre>
<p>How could we estimate the average number of times this would occur in a four-player game? The simulation trick still works. Pick a large number of simulations to get an accurate estimate; the larger, the more accurate (but also more work for your computer).</p>
<pre>
mean(str_count(replicate(10000, {chaos_bag_string_sim(n = 160)}), &quot;[34TLA]{2}&quot;))
</pre>
<pre>
[1] 10.6717
</pre>
<p>You can imagine that this can keep going and perhaps there are queries that you would like to see answered. Below I leave you with an R script that you can use to do these types of experiments. This script is designed to be run from a Unix-flavored command line, though you could <code>source()</code> the script into an R session to use the <code>chaos_bag_string_sim()</code> function interactively. Use regular expressions to define a pattern you are interested in (this is a good opportunity to learn regular expressions for those who want the exercise).</p>
<pre>
#!/usr/bin/Rscript
#######################################
# AHChaosBagSimulator.R
#######################################
# Curtis Miller
# 2018-08-03
# A script for simulating Arkham Horror's chaos bag
#######################################

chaos_bag_string_sim &lt;- function(dicebag = list('E' = 1,  # Elder Sign
                                                'P' = 1,  # +1
                                                '0' = 2,
                                                '1' = 3,  # -1
                                                '2' = 2,  # -2
                                                '3' = 1,
                                                '4' = 1,
                                                'S' = 2,  # Skull
                                                'C' = 1,  # Cultist
                                                'T' = 1,  # Tablet
                                                'L' = 1,  # Elder Thing
                                                'A' = 1), # Autofail
                                 n = 24, replace = TRUE) {
  paste0(sample(names(dicebag), replace = replace,
                prob = as.vector(unlist(dicebag)),
                size = n), collapse = '')
}

# optparse: A package for handling command line arguments
if (!suppressPackageStartupMessages(require(&quot;optparse&quot;))) {
  install.packages(&quot;optparse&quot;)
  require(&quot;optparse&quot;)
}

main &lt;- function(pattern, average = FALSE, pulls = 24, replications = 10000,
                 no_replacement = FALSE, dicebag = &quot;&quot;, help = FALSE) {

  if (dicebag != &quot;&quot;) {
    dicebag_df &lt;- read.csv(dicebag, stringsAsFactors = FALSE)
    dicebag_df$token &lt;- as.character(dicebag_df$token)
    if (!is.numeric(dicebag_df$freq)) {stop(&quot;Dicebag freq must be integers.&quot;)}
    dicebag &lt;- as.list(dicebag_df$freq)
    names(dicebag) &lt;- dicebag$token
  } else {
    dicebag = list('E' = 1,  # Elder Sign
                   'P' = 1,  # +1
                   '0' = 2,
                   '1' = 3,  # -1
                   '2' = 2,  # -2
                   '3' = 1,
                   '4' = 1,
                   'S' = 2,  # Skull
                   'C' = 1,  # Cultist
                   'T' = 1,  # Tablet
                   'L' = 1,  # Elder Thing
                   'A' = 1)  # Autofail
  }

  games &lt;- replicate(replications, {chaos_bag_string_sim(dicebag = dicebag,
                                                    n = pulls,
                                                    replace = !no_replacement)})

  if (average) {
    cat(&quot;Average occurance of pattern:&quot;, 
        mean(stringr::str_count(games, pattern)), &quot;\n&quot;)
  } else {
    cat(&quot;Probability of occurance of pattern:&quot;, 
        mean(grepl(pattern, games)), &quot;\n&quot;)
  }
  quit()
}

if (sys.nframe() == 0) {
  cl_args &lt;- parse_args(OptionParser(
        description = &quot;Simulates the Arkham Horror LCG chaos bag.&quot;,
        option_list = list(
          make_option(c(&quot;--pattern&quot;, &quot;-r&quot;), type = &quot;character&quot;,
                      help = &quot;Pattern (regular expression) to match&quot;),
          make_option(c(&quot;--average&quot;, &quot;-a&quot;), type = &quot;logical&quot;,
                      action = &quot;store_true&quot;, default = FALSE,
                      help = &quot;If set, computes average number of occurances&quot;),
          make_option(c(&quot;--pulls&quot;, &quot;-p&quot;), type = &quot;integer&quot;, default = 24,
                      help = &quot;The number of pulls from the chaos bag&quot;),
          make_option(c(&quot;--replications&quot;, &quot;-N&quot;), type = &quot;integer&quot;,
                      default = 10000,
                      help = &quot;Number of replications&quot;),
          make_option(c(&quot;--no-replacement&quot;, &quot;-n&quot;), type = &quot;logical&quot;,
                      action = &quot;store_true&quot;, default = FALSE,
                      help = &quot;Draw tokens without replacement&quot;),
          make_option(c(&quot;--dicebag&quot;, &quot;-d&quot;), type = &quot;character&quot;, default = &quot;&quot;,
                      help = &quot;(Optional) dice bag distribution CSV file&quot;)
        )
      ))

  names(cl_args)[which(names(cl_args) == &quot;no-replacement&quot;)] &lt;- &quot;no_replacement&quot;
  do.call(main, cl_args)
}
</pre>
<p>Below is an example of a CSV file specifying a chaos bag.</p>
<pre>
token,freq
E,1
P,1
0,2
1,3
2,2
3,1
4,1
S,2
C,1
T,1
L,1
A,1
</pre>
<p>Below is some example usage.</p>
<pre>
$ chmod +x AHChaosBagSimulator.R  # Only need to do this once
$ ./AHChaosBagSimulator.R -r AA -p 160
Probability of occurance of pattern: 0.4074
$ ./AHChaosBagSimulator.R -r [34TLA]{2} -a -p 160
Average occurance of pattern: 10.6225
</pre>
<p>To see documentation, type <code>./AHChaosBagSimulator.R --help</code>. Note that something must always be passed to <code>-r</code>; this is the pattern needed.</p>
<h2>Olive McBride</h2>
<p>This tool was initially written as a way to explore chaos bag probabilities. I didn't consider the tool to be very useful. It simply helped make the point that unlikely events seem to happen frequently in Arkham Horror. However, I found a way to put the tool to practical use.</p>
<p>Recently, Arkham Horror's designers have been releasing cards that seem to demand more math to fully understand. My favorite Arkham Horror card reviewer, <a rel="nofollow" href="https://www.youtube.com/channel/UCddF9gpguoEMONRFkCF0BTA" target="_blank">The Man from Leng</a>, has fretted about this in some of his recent reviews about <a rel="nofollow" href="https://arkhamdb.com/find?q=x%3Aseal&sort=name&view=list&decks=all&spoilers=hide" target="_blank">cards using the <strong>seal</strong> mechanic</a>, which change the composition of the chaos bag by removing tokens from it.</p>
<p>I can only imagine how he would feel about a card like Olive McBride (one of the cards appearing in the upcoming Mythos Pack, <a rel="nofollow" href="https://www.fantasyflightgames.com/en/news/2018/4/24/heart-of-the-elders/" target="_blank">&quot;Heart of the Elders&quot;</a>, to be released later this week.)</p>
<p><img alt="Olive McBride" src="https://ntguardian.files.wordpress.com/2018/08/olive-mcbride.png?w=456" data-recalc-dims="1"></p>
<p>Olive McBride allows you to reveal three chaos tokens instead of one, and choose two of those tokens to resolve. This effect can be triggered any time you would reveal a chaos token.</p>
<p>I'll repeat that again: Olive can trigger any time a chaos token is revealed. Most of the time tokens are revealed during skill tests, but other events lead to dipping into the chaos bag too. Notably, <em>The Dunwich Legacy</em> leads to drawing tokens without taking skill tests, such as when gambling in &quot;The House Always Wins&quot;, due to some encounter cards. This makes Olive McBride a <a rel="nofollow" href="https://www.reddit.com/r/arkhamhorrorlcg/comments/8el3ix/new_mythos_pack_announced_heart_of_the_elders/" target="_blank">&quot;master gambler&quot;</a>, since she can draw three tokens and pick the winning ones when gambling. (She almost breaks the scenario.) Additionally, Olive can be combined with cards like Ritual Candles and Grotesque Statue to further shift skill tests in your favor.</p>
<p><img alt="Ritual Candles" src="https://ntguardian.files.wordpress.com/2018/08/ritualcandles.jpg?w=456" data-recalc-dims="1"></p>
<p><img alt="Grotesque Statue" src="https://ntguardian.files.wordpress.com/2018/08/grotesquestatue.png?w=456" data-recalc-dims="1"></p>
<p>These are interesting situations but let's ignore combos like this for now. What does Olive do to your usual skill test? Specifically, what does she do to the modifiers?</p>
<p>Before going on, I need to address verbiage. When are about to perform a skill test, typically they will make a statement like &quot;I'm at +2 for this test&quot;. This means that the skill value of the investigator (after applying all modifiers) is two higher than the difficulty of the test. Thus, if the investigator draws a -2 or better, the investigator will pass the test; if the investigator daws a -3 or worse, the investigator fails. My play group does not say this; we say &quot;I'm at -2 for this test,&quot; meaning that if the investigator sees a -2 or better from the bag, the investigator will pass. This is more intuitive to me, and also I think it's more directly translated to math.</p>
<p>Presumably when doing a skill test with Olive, if all we care about is passing the test, we will pick the two tokens drawn from the bag that have the best modifiers. We add the modifiers of those tokens together to get the final modifier. Whether this improves your odds of passing the test or not isn't immediately clear.</p>
<p>I've written an R function that simulates skill tests with Olive. With this we can estimate Olive's effects.</p>
<pre>
olive_sim &lt;- function(translate = c(&quot;E&quot; = 2, &quot;P&quot; = 1, &quot;0&quot; = 0, &quot;1&quot; = -1,
                                    &quot;2&quot; = -2, &quot;3&quot; = -3, &quot;4&quot; = -4, &quot;S&quot; = -2,
				    &quot;C&quot; = -3, &quot;T&quot; = -4, &quot;L&quot; = -5, &quot;A&quot; = -Inf),
                       N = 1000, dicebag = NULL) {
  dargs &lt;- list(n = 3, replace = FALSE)
  if (!is.null(dicebag)) {
    dargs$dicebag &lt;- dicebag
  }

  pulls &lt;- replicate(N, {do.call(chaos_bag_string_sim, dargs)})
  vals &lt;- sapply(pulls, function(p) {
    vecp &lt;- strsplit(p, &quot;&quot;)[[1]]
    vecnum &lt;- translate[vecp]
    max(apply(combn(3, 2), 2, function(i) {sum(vecnum[i])}))
  })

  vals[which(is.nan(vals))] &lt;- Inf

  return(vals)
}
</pre>
<p>The parameter <code>translate</code> gives a vector that translates code for chaos tokens to numerical modifiers. Notice that the auto-fail token is assigned <code>-Inf</code> since it will cause any test to fail. If we wanted, say, the elder sign token to auto-succeed (which is Mateo's elder sign effect), we could replace its translation with <code>Inf</code>. By default the function uses the dicebag provided with <code>chaos_bag_string_sim()</code>, but this can be changed.</p>
<p>Here's a single final modifier from a pull using Olive.</p>
<pre>
olive_sim(N = 1)
</pre>
<pre>
C01
 -1
</pre>
<p>Interestingly, the function returned a named vector, and the name corresponds to what was pulled. In this case, a cultist, 0, and -1 token were pulled; the resulting best modifier is -1. The function is already built to do this many times.</p>
<pre>
olive_sim(N = 5)
</pre>
<pre>
31S 2S1 LS1 120 C2E
 -3  -3  -3  -1   0
</pre>
<p>Below is a function that can simulate a lot of normal skill tests.</p>
<pre>
test_sim &lt;- function(translate = c(&quot;E&quot; = 2, &quot;P&quot; = 1, &quot;0&quot; = 0, &quot;1&quot; = -1,
                                   &quot;2&quot; = -2, &quot;3&quot; = -3, &quot;4&quot; = -4, &quot;S&quot; = -2,
                                   &quot;C&quot; = -3, &quot;T&quot; = -4, &quot;L&quot; = -5, &quot;A&quot; = -Inf),
                       N = 1000, dicebag = NULL) {
  dargs &lt;- list(n = N, replace = TRUE)
  if (!is.null(dicebag)) {
    dargs$dicebag &lt;- dicebag
  }

  pulls &lt;- do.call(chaos_bag_string_sim, dargs)
  vecp &lt;- strsplit(pulls, &quot;&quot;)[[1]]
  vecnum &lt;- translate[vecp]

  return(vecnum)
}
</pre>
<p>Here's a demonstration.</p>
<pre>
test_sim(N = 5)
</pre>
<pre>
 2  S  3  1  0
-2 -2 -3 -1  0
</pre>
<p>Finally, below is a function that, when given a vector of results like those above, produce a table of estimated probabilities of success at skill tests when given a vector of values the tests must beat in order to pass the test (that is, using the &quot;I'm at -2&quot; type of language).</p>
<pre>
est_success_table_gen &lt;- function(res, values = (-10):3) {
  r = v)})
  names(r) &lt;- values
  return(rev(r))
}
</pre>
<p>Let's give it a test run.<sup><a rel="nofollow" href="https://ntguardian.wordpress.com/2018/08/13/evaluating-olive-mcbride-arkham-horror-lcg-chaos-bag-simulator-r/#fn-3304-4" target="_blank">4</a></sup></p>
<pre>
u &lt;- test_sim()
est_success_table_gen(u)
</pre>
<pre>
    3     2     1     0    -1    -2    -3    -4    -5    -6    -7    -8    -9
0.000 0.057 0.127 0.420 0.657 0.759 0.873 0.931 0.931 0.931 0.931 0.931 0.931
  -10
0.931
</pre>
<pre>
as.matrix(est_success_table_gen(u))
     [,1]
3   0.000
2   0.057
1   0.127
0   0.250
-1  0.420
-2  0.657
-3  0.759
-4  0.873
-5  0.931
-6  0.931
-7  0.931
-8  0.931
-9  0.931
-10 0.931
</pre>
<p>This represents the base probability of success. Let's see what Olive does to this table.</p>
<pre>
y &lt;- olive_sim()
as.matrix(est_success_table_gen(y))
</pre>
<pre>
     [,1]
3   0.024
2   0.063
1   0.140
0   0.238
-1  0.423
-2  0.531
-3  0.709
-4  0.829
-5  0.911
-6  0.960
-7  0.983
-8  0.996
-9  1.000
-10 1.000
</pre>
<p>Perhaps I can make the relationship more clear with a plot.</p>
<pre>
plot(stepfun((-10):3, rev(c(0, est_success_table_gen(u)))), verticals = FALSE,
     pch = 20, main = &quot;Probability of Success&quot;, ylim = c(0, 1))
lines(stepfun((-10):3, rev(c(0, est_success_table_gen(y)))), verticals = FALSE,
      pch = 20, col = &quot;blue&quot;)
</pre>
<p><img alt="" src="https://ntguardian.files.wordpress.com/2018/08/olive_comp_1.png?w=456" data-recalc-dims="1"></p>
<p>The black line is the estimated probability of success without Olive, and the blue line the same with Olive. (I tried reversing the <img alt="x" title="x" src="https://s0.wp.com/latex.php?latex=x&bg=ffffff&%23038;fg=444444&%23038;s=0" class="latex">-axis, but for some reason I could not get good results.) What we see is:</p>
<ul>
<li>Olive improves the chances a &quot;hail Mary&quot; will succeed. If you need +1, +2, or more to succeed, Olive can help make that happen (though the odds still aren't great)</li>
<li>Olive can help you guarantee a skill test will succeed. If you boost your skill value to very high numbers, Olive can effectively neuter the auto-fail token. That's a good feeling.</li>
<li>Otherwise, Olive hurts your chances of success. Being at -2 is particularly worse with Olive than without. However, most of the time she changes the probability of success too little to notice.</li>
</ul>
<p>For most investigators, then, Olive doesn't do much to make her worth your while. But I think Olive makes a huge difference for two investigators: Father Mateo and Jim Culver.</p>
<p><img alt="Father Mateo" src="https://ntguardian.files.wordpress.com/2018/08/mateo.jpeg?w=456" data-recalc-dims="1"> <img alt="Jim Culver" src="https://ntguardian.files.wordpress.com/2018/08/culver.png?w=456" data-recalc-dims="1"></p>
<p>Both of these investigators like some chaos bag tokens a lot. Father Mateo really likes the elder sign since it is an auto-success (in addition to other very good effects), while Jim Culver likes skulls since they are always 0.</p>
<p>What does Olive do for Father Mateo?</p>
<pre>
translate &lt;- c(&quot;E&quot; =  2, &quot;P&quot; =  1, &quot;0&quot; =  0, &quot;1&quot; = -1, &quot;2&quot; = -2, &quot;3&quot; = -3,
               &quot;4&quot; = -4, &quot;S&quot; = -2, &quot;C&quot; = -3, &quot;T&quot; = -4, &quot;L&quot; = -5, &quot;A&quot; = -Inf)
# Mateo
mateo_translate &lt;- translate; mateo_translate[&quot;E&quot;] &lt;- Inf
mateo_no_olive &lt;- test_sim(translate = mateo_translate)
mateo_olive &lt;- olive_sim(translate = mateo_translate)
plot(stepfun((-10):3,
             rev(c(0, est_success_table_gen(mateo_no_olive)))),
     verticals = FALSE,
     pch = 20, main = &quot;Mateo's Probabilities&quot;, ylim = c(0, 1))
lines(stepfun((-10):3,
             rev(c(0, est_success_table_gen(mateo_olive)))),
     verticals = FALSE, col = &quot;blue&quot;, pch = 20)
</pre>
<p><img alt="" src="https://ntguardian.files.wordpress.com/2018/08/olive_comp_22.png?w=456" data-recalc-dims="1"></p>
<pre>
as.matrix(est_success_table_gen(mateo_no_olive))
</pre>
<pre>
     [,1]
3   0.049
2   0.049
1   0.101
0   0.226
-1  0.393
-2  0.627
-3  0.745
-4  0.862
-5  0.928
-6  0.928
-7  0.928
-8  0.928
-9  0.928
-10 0.928
</pre>
<pre>
as.matrix(est_success_table_gen(mateo_olive))
</pre>
<pre>
     [,1]
3   0.177
2   0.177
1   0.218
0   0.278
-1  0.444
-2  0.554
-3  0.746
-4  0.842
-5  0.924
-6  0.972
-7  0.989
-8  0.997
-9  1.000
-10 1.000
</pre>
<p>Next up is Jim Culver.</p>
<pre>
# Culver
culver_translate &lt;- translate; culver_translate[&quot;S&quot;] &lt;- 0
culver_no_olive &lt;- test_sim(translate = culver_translate)
culver_olive &lt;- olive_sim(translate = culver_translate)
plot(stepfun((-10):3,
             rev(c(0, est_success_table_gen(culver_no_olive)))),
     verticals = FALSE,
     pch = 20, main = &quot;Culver's Probabilities&quot;, ylim = c(0, 1))
lines(stepfun((-10):3,
             rev(c(0, est_success_table_gen(culver_olive)))),
     verticals = FALSE, col = &quot;blue&quot;, pch = 20)
</pre>
<p><img alt="" src="https://ntguardian.files.wordpress.com/2018/08/olive_comp_31.png?w=456" data-recalc-dims="1"></p>
<pre>
as.matrix(est_success_table_gen(culver_no_olive))
</pre>
<pre>
     [,1]
3   0.000
2   0.065
1   0.112
0   0.333
-1  0.530
-2  0.638
-3  0.761
-4  0.874
-5  0.936
-6  0.936
-7  0.936
-8  0.936
-9  0.936
-10 0.936
</pre>
<pre>
as.matrix(est_success_table_gen(culver_olive))
</pre>
<pre>
     [,1]
3   0.020
2   0.095
1   0.217
0   0.362
-1  0.564
-2  0.666
-3  0.803
-4  0.888
-5  0.951
-6  0.972
-7  0.992
-8  0.999
-9  1.000
-10 1.000
</pre>
<p>Olive helps these investigators succeed at skill tests more easily, especially Mateo. We haven't even taken account of the fact that good things happen when certain tokens appear for these investigators! Sealing tokens could also have a big impact on the distribution of the bag when combined with Olive McBride.</p>
<p>Again, there's a lot that could be touched on that I won't here, so I will share with you a script allowing you to do some of these analyses yourself.</p>
<pre>
#!/usr/bin/Rscript
#######################################
# AHOliveDistributionEstimator.R
#######################################
# Curtis Miller
# 2018-08-03
# Simulates the chaos bag distribution when applying Olive McBride
#######################################

# optparse: A package for handling command line arguments
if (!suppressPackageStartupMessages(require(&quot;optparse&quot;))) {
  install.packages(&quot;optparse&quot;)
  require(&quot;optparse&quot;)
}

olive_sim &lt;- function(translate = c(&quot;E&quot; =  2, &quot;P&quot; =  1, &quot;0&quot; =  0, &quot;1&quot; = -1,
                                    &quot;2&quot; = -2, &quot;3&quot; = -3, &quot;4&quot; = -4, &quot;S&quot; = -2,
				                            &quot;C&quot; = -3, &quot;T&quot; = -4, &quot;L&quot; = -5, &quot;A&quot; = -Inf),
                       N = 1000, dicebag = NULL) {
  dargs &lt;- list(n = 3, replace = FALSE)
  if (!is.null(dicebag)) {
    dargs$dicebag &lt;- dicebag
  }

  pulls &lt;- replicate(N, {do.call(chaos_bag_string_sim, dargs)})
  vals &lt;- sapply(pulls, function(p) {
    vecp &lt;- strsplit(p, &quot;&quot;)[[1]]
    vecnum &lt;- translate[vecp]
    max(apply(combn(3, 2), 2, function(i) {sum(vecnum[i])}))
  })

  vals[which(is.nan(vals))] &lt;- Inf

  return(vals)
}

test_sim &lt;- function(translate = c(&quot;E&quot; =  2, &quot;P&quot; =  1, &quot;0&quot; =  0, &quot;1&quot; = -1,
                                   &quot;2&quot; = -2, &quot;3&quot; = -3, &quot;4&quot; = -4, &quot;S&quot; = -2,
                                   &quot;C&quot; = -3, &quot;T&quot; = -4, &quot;L&quot; = -5, &quot;A&quot; = -Inf),
                       N = 1000, dicebag = NULL) {
  dargs &lt;- list(n = N, replace = TRUE)
  if (!is.null(dicebag)) {
    dargs$dicebag &lt;- dicebag
  }

  pulls &lt;- do.call(chaos_bag_string_sim, dargs)
  vecp &lt;- strsplit(pulls, &quot;&quot;)[[1]]
  vecnum &lt;- translate[vecp]

  return(vecnum)
}

est_success_table_gen &lt;- function(res, values = (-10):3) {
  r &lt;-  sapply(values, function(v) {mean(res >= v)})
  names(r) &lt;- values
  return(rev(r))
}

# Main function
# See definition of cl_args for functionality (help does nothing)
main &lt;- function(dicebag = &quot;&quot;, translate = &quot;&quot;, replications = 10000,
                 plotfile = &quot;&quot;, width = 6, height = 4, basic = FALSE,
                 oliveless = FALSE, lowest = -10, highest = 3,
                 chaos_bag_script = &quot;AHChaosBagSimulator.R&quot;,
                 title = &quot;Probability of Success&quot;,
                 pos = &quot;topright&quot;, help = FALSE) {

  source(chaos_bag_script)

  if (dicebag != &quot;&quot;) {
    dicebag_df &lt;- read.csv(dicebag, stringsAsFactors = FALSE)
    dicebag &lt;- as.numeric(dicebag_df$freq)
    names(dicebag) &lt;- dicebag_df$token
  } else {
    dicebag &lt;- NULL
  }

  if (translate != &quot;&quot;) {
    translate_df &lt;- read.csv(translate, stringsAsFactors = FALSE)
    translate &lt;- as.numeric(translate_df$mod)
    names(translate) &lt;- translate_df$token
  } else {
    translate &lt;- c(&quot;E&quot; =  2, &quot;P&quot; =  1, &quot;0&quot; =  0, &quot;1&quot; = -1,
                  &quot;2&quot; = -2, &quot;3&quot; = -3, &quot;4&quot; = -4, &quot;S&quot; = -2,
                  &quot;C&quot; = -3, &quot;T&quot; = -4, &quot;L&quot; = -5, &quot;A&quot; = -Inf)
  }

  if (any(names(translate) != names(dicebag))) {
    stop(&quot;Name mismatch between translate and dicebag; check the token columns&quot;)
  }

  if (!oliveless) {
    olive_res &lt;- olive_sim(translate = translate, dicebag = dicebag,
                           N = replications)
    cat(&quot;Table of success rate with Olive when at lest X is needed:\n&quot;)
    print(as.matrix(est_success_table_gen(olive_res, values = lowest:highest)))
    cat(&quot;\n\n&quot;)
  }

  if (basic) {
    basic_res &lt;- test_sim(translate = translate, dicebag = dicebag,
                          N = replications)
    cat(&quot;Table of success rate for basic test when at lest X is needed:\n&quot;)
    print(as.matrix(est_success_table_gen(basic_res, values = lowest:highest)))
    cat(&quot;\n\n&quot;)
  }

  if (plotfile != &quot;&quot;) {
    png(plotfile, width = width, height = height, units = &quot;in&quot;, res = 300)
    if (basic) {
      plot(stepfun(lowest:highest, rev(c(0, est_success_table_gen(basic_res)))),
        verticals = FALSE, pch = 20, main = title,
        ylim = c(0, 1))
      if (!oliveless) {
        lines(stepfun(lowest:highest,
            rev(c(0, est_success_table_gen(olive_res)))),
          verticals = FALSE, pch = 20, col = &quot;blue&quot;)
        legend(pos, legend = c(&quot;No Olive&quot;, &quot;Olive&quot;), col = c(&quot;black&quot;, &quot;blue&quot;),
               lty = 1, pch = 20)
      }
    }
    dev.off()
  }
  quit()
}

if (sys.nframe() == 0) {
  cl_args &lt;- parse_args(OptionParser(
        description = &quot;Estimate the chaos bag distribution with Olive McBride.&quot;,
        option_list = list(
          make_option(c(&quot;--dicebag&quot;, &quot;-d&quot;), type = &quot;character&quot;, default = &quot;&quot;,
                      help = &quot;(Optional) dice bag distribution CSV file&quot;),
          make_option(c(&quot;--translate&quot;, &quot;-t&quot;), type = &quot;character&quot;, default = &quot;&quot;,
                      help = &quot;(Optional) symbol numeric translation CSV file&quot;),
          make_option(c(&quot;--replications&quot;, &quot;-r&quot;), type = &quot;integer&quot;,
                      default = 10000,
                      help = &quot;Number of replications to perform&quot;),
          make_option(c(&quot;--plotfile&quot;, &quot;-p&quot;), type = &quot;character&quot;, default = &quot;&quot;,
                      help = paste(&quot;Where to save plot (if not set, no plot&quot;,
                                   &quot;made; -b/--basic must be set)&quot;)),
          make_option(c(&quot;--width&quot;, &quot;-w&quot;), type = &quot;integer&quot;, default = 6,
                      help = &quot;Width of plot (inches)&quot;),
          make_option(c(&quot;--height&quot;, &quot;-H&quot;), type = &quot;integer&quot;, default = 4,
                      help = &quot;Height of plot (inches)&quot;),
          make_option(c(&quot;--basic&quot;, &quot;-b&quot;), type = &quot;logical&quot;,
                      action = &quot;store_true&quot;, default = FALSE,
                      help = &quot;Include results for test without Olive McBride&quot;),
          make_option(c(&quot;--oliveless&quot;, &quot;-o&quot;), type = &quot;logical&quot;,
                      action = &quot;store_true&quot;, default = FALSE,
                      help = &quot;Don't include results using Olive McBride&quot;),
          make_option(c(&quot;--lowest&quot;, &quot;-l&quot;), type = &quot;integer&quot;, default = -10,
                      help = &quot;Lowest value to check&quot;),
          make_option(c(&quot;--highest&quot;, &quot;-i&quot;), type = &quot;integer&quot;, default = 3,
                      help = &quot;Highest value to check&quot;),
          make_option(c(&quot;--pos&quot;, &quot;-s&quot;), type = &quot;character&quot;,
                      default = &quot;topright&quot;, help = &quot;Position of legend&quot;),
          make_option(c(&quot;--title&quot;, &quot;-m&quot;), type = &quot;character&quot;,
                      default = &quot;Probability of Success&quot;,
                      help = &quot;Title of plot&quot;),
          make_option(c(&quot;--chaos-bag-script&quot;, &quot;-c&quot;), type = &quot;character&quot;,
                      default = &quot;AHChaosBagSimulator.R&quot;,
                      help = paste(&quot;Location of the R file containing&quot;,
                                   &quot;chaos_bag_string_sim() definition; by&quot;,
                                   &quot;default, assumed to be in the working&quot;,
                                   &quot;directory in AHChaosBagSimulator.R&quot;))
        )
      ))

  names(cl_args)[which(
    names(cl_args) == &quot;chaos-bag-script&quot;)] = &quot;chaos_bag_script&quot;

  do.call(main, cl_args)
}
</pre>
<p>You've already seen an example CSV file for defining the dice bag; here's a file for defining what each token is worth.</p>
<pre>
token,mod
E,2
P,1
0,0
1,-1
2,-2
3,-3
4,-4
S,-2
C,-3
T,-4
L,-5
A,-Inf
</pre>
<p>Make the script executable and get help like so:</p>
<pre>
$ chmod +x AHOliveDistributionEstimator.R
$ ./AHOliveDistributionEstimator.R -h
</pre>
<h2>Conclusion</h2>
<p>If you've never heard of this game I love, hopefully you've heard of it now. Give the game a look! And if you have heard of this game before, I hope you learned something from this post. If you're a reviewer, perhaps I've given you some tools you could use to help evaluate some of Arkham Horror's more intractable cards.</p>
<p>My final thoughts on Olive: she's not going to displace <a rel="nofollow" href="https://arkhamdb.com/card/01063" target="_blank">Arcane Initiate's</a> spot as the best Mystic ally, but she could do well in certain decks. Specifically, I think that Mateo decks and Jim Culver decks planning on running <a rel="nofollow" href="https://arkhamdb.com/card/02112" target="_blank">Song of the Dead</a> will want to run her since there are specific chaos tokens those decks want to see; the benefits of Olive extend beyond changing the probability of success. Most of the time you will not want to make a hail Mary skill test and you won't have the cards to push your skill value to a point where anything but the auto-fail is a success, so most of the time Olive will hurt your chances rather than help you, if she has any effect at all. Thus a typical Mystic likely won't find Olive interesting… but some decks will love her.</p>
<p>By the way, if you are in the Salt Lake City area of Utah, I play Arkham Horror LCG at <a rel="nofollow" href="http://mind-games.com/" target="_blank">Mind Games, LLC</a>. While I haven't been to many other stores, Mind Games seems to have the best stocking of Arkham Horror (as well as two other Fantasy Flight LCGs, <em>A Game of Thrones</em> and <em>Legend of the Five Rings</em>). Every Tuesday night (the store's late night) a group of card game players come in to play; consider joining us! In addition, Mind Games likely has the best deal when it comes to buying the game; whenever you spend $50 on product, you get an additional $10 off (or, alternatively, you take $10 off for every $60 you spend). Thus Mind Games could be the cheapest way to get the game (without going second-hand or Internet deal hunting).</p>
<p><em>(Big image credit: <a rel="nofollow" href="https://www.artstation.com/artwork/XKJQD" target="_blank">Aurore Folney and FFG</a>.)</em></p>
<p><strong>EDIT: WordPress.com does not like R code and garbled some of the code in the script for Olive simulation. It should be correct now. If anyone spots other errors, please notify me; I will fix them.</strong></p>
<hr>
<p>I have created a video course published by <a rel="nofollow" href="http://packtpub.com/" target="_blank">Packt Publishing</a> entitled <a rel="nofollow" href="https://ntguardian.wordpress.com/video-courses/applications-of-statistical-learning-with-python/" target="_blank"><em>Applications of Statistical Learning with Python</em></a>, the fourth volume in a four-volume set of video courses entitled, <em>Taming Data with Python; Excelling as a Data Analyst</em>. This course discusses how to use Python for data science, emphasizing application. It starts with introducing natural language processing and computer vision. It ends with two case studies; in one, I train a classifier to detect spam e-mail, while in the other, I train a computer vision system to detect emotions in faces. Viewers get a hands-on experience using Python for machine learning. If you are starting out using Python for data analysis or know someone who is, please consider <a rel="nofollow" href="https://www.packtpub.com/big-data-and-business-intelligence/applications-statistical-learning-python-video" target="_blank">buying my course</a> or at least spreading the word about it. You can buy the course directly or purchase a <a rel="nofollow" href="https://www.packtpub.com/mapt/" target="_blank">subscription to Mapt</a> and watch it there.</p>
<p>If you like my blog and would like to support it, spread the word (if not get a copy yourself)! Also, stay tuned for future courses I publish with Packt at the Video Courses section of my site.</p>
<div>
<hr>
<ol>
<li>
You can also play scenarios stand-alone, which isn’t nearly as fun as playing in a campaign, especially one of the eight-scenario campaigns. <a rel="nofollow" href="https://ntguardian.wordpress.com/2018/08/13/evaluating-olive-mcbride-arkham-horror-lcg-chaos-bag-simulator-r/#fnref-3304-1" target="_blank"><img alt="↩" src="https://s.w.org/images/core/emoji/2.4/72x72/21a9.png" class="wp-smiley"></a>
</li>
<li>
This is not right because sometims you redraw tokens from the bag without replacement; we'll ignore that case for now. <a rel="nofollow" href="https://ntguardian.wordpress.com/2018/08/13/evaluating-olive-mcbride-arkham-horror-lcg-chaos-bag-simulator-r/#fnref-3304-2" target="_blank"><img alt="↩" src="https://s.w.org/images/core/emoji/2.4/72x72/21a9.png" class="wp-smiley"></a>
</li>
<li>
Using the asymptotically appropriate confidence interval based on the Normal distribution (as described <a rel="nofollow" href="https://ntguardian.wordpress.com/2018/08/13/evaluating-olive-mcbride-arkham-horror-lcg-chaos-bag-simulator-r/" target="_blank">here</a>), the margin of error error will not exceed <img alt="frac{1}{sqrt{n}}" title="frac{1}{sqrt{n}}" src="https://s0.wp.com/latex.php?latex=%5Cfrac%7B1%7D%7B%5Csqrt%7Bn%7D%7D&bg=ffffff&%23038;fg=444444&%23038;s=0" class="latex"> since <img alt="sqrt{hat{p}(1 - hat{p})} leq frac{1}{2}" title="sqrt{hat{p}(1 - hat{p})} leq frac{1}{2}" src="https://s0.wp.com/latex.php?latex=%5Csqrt%7B%5Chat%7Bp%7D%281+-+%5Chat%7Bp%7D%29%7D+%5Cleq+%5Cfrac%7B1%7D%7B2%7D&bg=ffffff&%23038;fg=444444&%23038;s=0" class="latex">. Thus, we have <img alt="m leq frac{1}{sqrt{n}}" title="m leq frac{1}{sqrt{n}}" src="https://s0.wp.com/latex.php?latex=m+%5Cleq+%5Cfrac%7B1%7D%7B%5Csqrt%7Bn%7D%7D&bg=ffffff&%23038;fg=444444&%23038;s=0" class="latex">; solving this for <img alt="n" title="n" src="https://s0.wp.com/latex.php?latex=n&bg=ffffff&%23038;fg=444444&%23038;s=0" class="latex"> yields <img alt="n geq m^{-2}" title="n geq m^{-2}" src="https://s0.wp.com/latex.php?latex=n+%5Cgeq+m%5E%7B-2%7D&bg=ffffff&%23038;fg=444444&%23038;s=0" class="latex">. So if we want a 95% chance that the margin of error will not exceed <img alt="m = 0.01 = frac{1}{100}" title="m = 0.01 = frac{1}{100}" src="https://s0.wp.com/latex.php?latex=m+%3D+0.01+%3D+%5Cfrac%7B1%7D%7B100%7D&bg=ffffff&%23038;fg=444444&%23038;s=0" class="latex">, we need a dataset of size <img alt="n geq (0.01)^{-2} = 10,000" title="n geq (0.01)^{-2} = 10,000" src="https://s0.wp.com/latex.php?latex=n+%5Cgeq+%280.01%29%5E%7B-2%7D+%3D+10%2C000&bg=ffffff&%23038;fg=444444&%23038;s=0" class="latex">. <a rel="nofollow" href="https://ntguardian.wordpress.com/2018/08/13/evaluating-olive-mcbride-arkham-horror-lcg-chaos-bag-simulator-r/#fnref-3304-3" target="_blank"><img alt="↩" src="https://s.w.org/images/core/emoji/2.4/72x72/21a9.png" class="wp-smiley"></a>
</li>
<li>
Note that the earlier calculations that argued the odds of being accurate up to two decimal places were high no longer hold, since many more numbers are being estimated, and one estimate is not independent of the other. That said, the general principle of more simulations leading to better accuracy still holds. <a rel="nofollow" href="https://ntguardian.wordpress.com/2018/08/13/evaluating-olive-mcbride-arkham-horror-lcg-chaos-bag-simulator-r/#fnref-3304-4" target="_blank"><img alt="↩" src="https://s.w.org/images/core/emoji/2.4/72x72/21a9.png" class="wp-smiley"></a>
</li>
</ol>
</div>
	<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="https://ntguardian.wordpress.com/2018/08/13/evaluating-olive-mcbride-arkham-horror-lcg-chaos-bag-simulator-r/"> R – Curtis Miller's Personal Website</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...
<img width="1" alt="" src="http://feeds.feedburner.com/~r/RBloggers/~4/WsIBPdTOSoo" height="1"></a></div>