sapply(c("pipeR","dplyr"), require, character.only = TRUE)
Loading required package: dplyr
Attaching package: ‘dplyr’
The following objects are masked from ‘package:stats’:
filter, lag
The following objects are masked from ‘package:base’:
intersect, setdiff, setequal, union
pipeR dplyr
TRUE TRUE
d1 <- data.frame(year = seq(2000, 2015, 1), v1 = rnorm(n = 16))
d2 <- data.frame(year = seq(1995, 2010, 1), v2 = rnorm(n = 16))
d3 <- data.frame(year = seq(2000, 2010, 1), v3 = rnorm(n = 11))
list(d1, d2, d3) %>>% str()
List of 3
$ :'data.frame': 16 obs. of 2 variables:
..$ year: num [1:16] 2000 2001 2002 2003 2004 ...
..$ v1 : num [1:16] 1.356 0.064 -0.118 0.151 -0.708 ...
$ :'data.frame': 16 obs. of 2 variables:
..$ year: num [1:16] 1995 1996 1997 1998 1999 ...
..$ v2 : num [1:16] -0.177 -0.362 -0.151 -0.585 0.611 ...
$ :'data.frame': 11 obs. of 2 variables:
..$ year: num [1:11] 2000 2001 2002 2003 2004 ...
..$ v3 : num [1:11] 0.192 1.208 -0.198 -1.335 1.801 ...
list(d1, d2, d3) %>>% {Reduce(dplyr::full_join, (.))} -> d
Joining, by = "year"
Joining, by = "year"
head(d)
list(d1, d2, d3) %>>%
{Reduce(dplyr::full_join, (.))} %>>%
dplyr::arrange(desc(year))
Joining, by = "year"
Joining, by = "year"
devtools::session_info()
Session info --------------------------------------------------------
setting value
version R version 3.3.1 (2016-06-21)
system x86_64, mingw32
ui RStudio (1.0.35)
language en
collate Japanese_Japan.932
tz Asia/Tokyo
date 2016-10-26
Packages ------------------------------------------------------------
package * version date source
assertthat 0.1 2013-12-06 CRAN (R 3.2.1)
base64enc 0.1-3 2015-07-28 CRAN (R 3.2.2)
DBI 0.5-1 2016-09-10 CRAN (R 3.2.5)
devtools 1.12.0 2016-06-24 CRAN (R 3.3.1)
digest 0.6.10 2016-08-02 CRAN (R 3.3.1)
dplyr * 0.5.0 2016-06-24 CRAN (R 3.2.5)
evaluate 0.9 2016-04-29 CRAN (R 3.3.1)
htmltools 0.3.5 2016-03-21 CRAN (R 3.2.5)
jsonlite 1.1 2016-09-14 CRAN (R 3.2.5)
knitr 1.14 2016-08-13 CRAN (R 3.2.5)
lazyeval 0.2.0 2016-06-12 CRAN (R 3.2.5)
magrittr 1.5 2014-11-22 CRAN (R 3.2.1)
memoise 1.0.0 2016-01-29 CRAN (R 3.2.3)
openxlsx * 3.0.0 2015-07-03 CRAN (R 3.2.2)
pipeR * 0.6.1.3 2016-04-04 CRAN (R 3.3.1)
R6 2.1.3 2016-08-19 CRAN (R 3.2.5)
Rcpp 0.12.7 2016-09-05 CRAN (R 3.2.5)
readxl * 0.1.1 2016-03-28 CRAN (R 3.2.5)
rmarkdown 1.0.9016 2016-10-09 Github (rstudio/rmarkdown@2158b9d)
rstudioapi 0.6 2016-06-27 CRAN (R 3.2.5)
stringi 1.1.1 2016-05-27 CRAN (R 3.2.5)
stringr 1.1.0 2016-08-19 CRAN (R 3.2.5)
tibble 1.2 2016-08-26 CRAN (R 3.2.5)
withr 1.0.2 2016-06-20 CRAN (R 3.2.5)
yaml 2.1.13 2014-06-12 CRAN (R 3.2.1)
LS0tDQp0aXRsZTogIkpvaW5pbmcgbXVsdGlwbGUgZGF0YSBmcmFtZXMiDQpvdXRwdXQ6IGh0bWxfbm90ZWJvb2sNCi0tLQ0KDQoNCmBgYHtyfQ0Kc2FwcGx5KGMoInBpcGVSIiwiZHBseXIiKSwgcmVxdWlyZSwgY2hhcmFjdGVyLm9ubHkgPSBUUlVFKQ0KYGBgDQoNCmBgYHtyfQ0KZDEgPC0gZGF0YS5mcmFtZSh5ZWFyID0gc2VxKDIwMDAsIDIwMTUsIDEpLCB2MSA9IHJub3JtKG4gPSAxNikpDQpkMiA8LSBkYXRhLmZyYW1lKHllYXIgPSBzZXEoMTk5NSwgMjAxMCwgMSksIHYyID0gcm5vcm0obiA9IDE2KSkNCmQzIDwtIGRhdGEuZnJhbWUoeWVhciA9IHNlcSgyMDAwLCAyMDEwLCAxKS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