Skip to content

Commit dfd882e

Browse files
author
Sean Lucey
committed
Needed to add in the tallys for all directors for comparison code
1 parent d87c124 commit dfd882e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

R/table_for_plotting.R

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ for(isim in 1:nrow(files)){
4141
out[Size > 900, Strength := 'Strong']
4242

4343
#Drop extra columns
44-
out[, c('Neg', 'Neu', 'Pos') := NULL]
44+
#out[, c('Neg', 'Neu', 'Pos') := NULL]
4545

4646
#join
4747
all.results <- rbindlist(list(all.results, out))
@@ -87,10 +87,11 @@ for(isp in 1:length(groups)){
8787
sp.result[Size > 900, Strength := 'Strong']
8888

8989
#Drop extra columns
90-
sp.result[, c('Negative', 'Neutral', 'Positive', 'Direction') := NULL]
90+
setnames(sp.result, c('Negative', 'Neutral', 'Positive'), c('Neg', 'Neu', 'Pos'))
91+
sp.result[, 'Direction' := NULL]
9192

9293
#join
93-
all.results <- rbindlist(list(all.results, sp.result))
94+
all.results <- rbindlist(list(all.results, sp.result), use.names = T)
9495
}
9596

9697
data.table::setkey(all.results, 'Model_ID', 'Scenario', 'Group')

data/all.results.rda

3.52 KB
Binary file not shown.

0 commit comments

Comments
 (0)