-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathoutput_monitor.Rout
61 lines (51 loc) · 1.76 KB
/
output_monitor.Rout
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
50
51
52
53
54
55
56
57
58
59
60
61
R version 4.0.0 (2020-04-24) -- "Arbor Day"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin17.0 (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> require(data.table)
Loading required package: data.table
> fls = list.files('output/coastal_city_by_day/',recursive = T,full.names = T)
> require(stringr)
Loading required package: stringr
> aggregate_sets = list()
> require(doParallel)
Loading required package: doParallel
Loading required package: foreach
Loading required package: iterators
Loading required package: parallel
> require(parallel)
> cl = makeCluster(4)
> registerDoParallel(cl)
>
> parallel::clusterEvalQ(cl,require(data.table))
[[1]]
[1] TRUE
[[2]]
[1] TRUE
[[3]]
[1] TRUE
[[4]]
[1] TRUE
>
> file = 'output/flood_tweets_by_city_hour.csv'
>
> foreach(i = seq_along(fls)) %dopar% {
+ temp = fread(fls[i])
+ temp = temp[Probability_Flooding_V2>0.5,]
+ temp = temp[,list(.N),by=.(GEOID,place.name,year,month,day,hour)]
+ setnames(temp,c('N'),c('Flooding_Tweets_p.5'))
+ if(!file.exists(file)){fwrite(temp,file)}
+ else{fwrite(temp,file,append = T)}
+ }
Error in unserialize(socklist[[n]]) : error reading from connection
Calls: %dopar% ... recvOneData -> recvOneData.SOCKcluster -> unserialize
Execution halted