In the SOA solution for the December 2019 exam they have a table that makes it clear that we should combine a variable. It looks like this
Martial_status…………target=low value…………target=high value…………n…………proportion of high value
divorced……………………5829………………………………669……………………6498…………0.10295476
Married-AF_spouse……19…………………………………..12……………………31……………….0.38709677
etc. etc. note I can not copy paste a table here either so it also does not look good, but in the actual solution it is very clear.
This table makes it VERY quick and easy to see what needs to be combined. It would take two seconds using a pivot table in excel but we can not use that feature.
I like doing:
table(df$marital_status,df$value_flag)
which gives me the perfect summary. However I can not easily copy and paste this from R to excel.
Rather than write some confusing (and easily forgotten) code in R to make this table, how do we get this table into our word document???
Is there some easy way to copy from R to excel? Is this a simple function not contained in the solution?