Reduce
    Reduce函数是将每次计算后的结果保留,并与下一个数字进行计算,这是和 apply 函数不同的,例如下面合并多个数据框

    1. > df1 <- data.frame(id=c(1,2,3),name=c('Joseph','Summer','dograbbit'))
    2. > df2 <- data.frame(id=c(1,2),money=c('0','100'))
    3. > df3 <- data.frame(id=c(1,3),looking=c('handsom','cute'))
    4. ## Reduce
    5. > Reduce(function(x,y) merge(x,y,by="id",all.x=TRUE),list(df1,df2,df3))
    6. id name money looking
    7. 1 1 Joseph 0 handsom
    8. 2 2 Summer 100 <NA>
    9. 3 3 dograbbit <NA> cute

    assign get
    变量名称和字符串的转换

    1. > a1
    2. Error: object 'a1' not found
    3. > a2
    4. Error: object 'a2' not found
    5. > for(i in c("a1","a2")){
    6. + assign(i,1)
    7. + }
    8. > a1
    9. [1] 1
    10. > a2
    11. [1] 1
    12. > get("a1")
    13. [1] 1

    quote eval parse expression bquote substitute name symbol
    https://blog.csdn.net/songzhilian22/article/details/49487467