-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTable1.R
49 lines (46 loc) · 3.38 KB
/
Table1.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
options(scipen = 100, digits=3)
# ---------- Table 1------------
ind = which(allBOTH.filter$fuel == 'corn' & allBOTH.filter$variable == 'CO_DACOM_DISKIN' & is.finite(allBOTH.filter$FinalEF))
cornplumes = length(ind)
cornfires = length(unique(allBOTH.filter$fire[ind]))
cornmce = c(mean(allBOTH.filter$MCE[ind], na.rm=TRUE),sd(allBOTH.filter$MCE[ind], na.rm=TRUE))
ind = which(allBOTH.filter$fuel == 'soybean' & allBOTH.filter$variable == 'CO_DACOM_DISKIN'& is.finite(allBOTH.filter$FinalEF))
soyplumes = length(ind)
soyfires = length(unique(allBOTH.filter$fire[ind]))
soymce = c(mean(allBOTH.filter$MCE[ind], na.rm=TRUE),sd(allBOTH.filter$MCE[ind], na.rm=TRUE))
ind = which(allBOTH.filter$fuel == 'rice' & allBOTH.filter$variable == 'CO_DACOM_DISKIN'& is.finite(allBOTH.filter$FinalEF))
riceplumes = length(ind)
ricefires = length(unique(allBOTH.filter$fire[ind]))
ricemce = c(mean(allBOTH.filter$MCE[ind], na.rm=TRUE),sd(allBOTH.filter$MCE[ind], na.rm=TRUE))
ind = which(allBOTH.filter$fuel == 'winter wheat' & allBOTH.filter$variable == 'CO_DACOM_DISKIN'& is.finite(allBOTH.filter$FinalEF))
wheatplumes = length(ind)
wheatfires = length(unique(allBOTH.filter$fire[ind]))
wheatmce = c(mean(allBOTH.filter$MCE[ind], na.rm=TRUE),sd(allBOTH.filter$MCE[ind], na.rm=TRUE))
ind = which(allBOTH.filter$fuel == 'grass' & allBOTH.filter$variable == 'CO_DACOM_DISKIN'& is.finite(allBOTH.filter$FinalEF))
grassplumes = length(ind)
grassfires = length(unique(allBOTH.filter$fire[ind]))
grassmce = c(mean(allBOTH.filter$MCE[ind], na.rm=TRUE),sd(allBOTH.filter$MCE[ind], na.rm=TRUE))
ind = which(allBOTH.filter$fuel == 'slash' & allBOTH.filter$variable == 'CO_DACOM_DISKIN'& is.finite(allBOTH.filter$FinalEF))
slashplumes = length(ind)
slashfires = length(unique(allBOTH.filter$fire[ind]))
slashmce = c(mean(allBOTH.filter$MCE[ind], na.rm=TRUE),sd(allBOTH.filter$MCE[ind], na.rm=TRUE))
ind = which(allBOTH.filter$fuel == 'pile' & allBOTH.filter$variable == 'CO_DACOM_DISKIN'& is.finite(allBOTH.filter$FinalEF))
pileplumes = length(ind)
pilefires = length(unique(allBOTH.filter$fire[ind]))
pilemce = c(mean(allBOTH.filter$MCE[ind], na.rm=TRUE),sd(allBOTH.filter$MCE[ind], na.rm=TRUE))
ind = which(allBOTH.filter$fuel == 'shrub' & allBOTH.filter$variable == 'CO_DACOM_DISKIN'& is.finite(allBOTH.filter$FinalEF))
shrubplumes = length(ind)
shrubfires = length(unique(allBOTH.filter$fire[ind]))
shrubmce = c(mean(allBOTH.filter$MCE[ind], na.rm=TRUE),sd(allBOTH.filter$MCE[ind], na.rm=TRUE))
ind = which(allBOTH.filter$fire == 'BlackwaterRiver' & allBOTH.filter$variable == 'CO_DACOM_DISKIN' &
allBOTH.filter$MAtoF.5hz <= 0.2& is.finite(allBOTH.filter$FinalEF))
BWplumes = length(ind)
BWfires = length(unique(allBOTH.filter$fire[ind]))
BWmce = c(mean(allBOTH.filter$MCE[ind], na.rm=TRUE),sd(allBOTH.filter$MCE[ind], na.rm=TRUE))
fires = c(cornfires,ricefires,soyfires, wheatfires, grassfires, slashfires, pilefires, shrubfires, BWfires )
plumes = c(cornplumes,riceplumes, soyplumes, wheatplumes, grassplumes, slashplumes, pileplumes, shrubplumes,BWplumes )
mce = round(c(cornmce[1],ricemce[1],soymce[1],wheatmce[1],grassmce[1],slashmce[1],pilemce[1],shrubmce[1], BWmce[1]),4)
mcesd = round(c(cornmce[2],ricemce[2],soymce[2],wheatmce[2],grassmce[2],slashmce[2],pilemce[2],shrubmce[2],BWmce[2]),3)
table1 = cbind(fires, plumes,mce, mcesd)
rownames(table1) = c("corn", "rice","soy","wheat","grass","slash","pile","shrub","BW")
table1 = as.data.frame(table1)