Hi, 
I want to make a data table that I have, to something that is more comprehensive. In abstract this is what I intend to do: 

    > df
      cond_1 cond_2 cond_3 cond_4
    1      a      a      b      e
    2      b      b      c      f
    3   <NA>      c      d      g

    > df_t
      cond_1 cond_2 cond_3 cond_4
    a      +      +      -      -
    b      +      +      +      -
    c      -      +      +      -
    d      -      -      +      -
    e      -      -      -      +
    f      -      -      -      +
    g      -      -      -      +

Is there any package or function that can do the job or facilitate coding? Any suggestion is a big help! 
    rownames = unique(unlist(df))
    rownames = rownames[!is.na(rownames)]
    df2 = sapply(df, function(x) ifelse(rownames %in% x,  "+", "-"))
    df3 = as.data.frame(df2, stringsAsFactors = F, row.names = rownames)
    
    > df3
      cond_1 cond_2 cond_3 cond_4
    a      +      +      -      -
    b      +      +      +      -
    c      -      +      +      -
    d      -      -      +      -
    e      -      -      -      +
    f      -      -      -      +
    g      -      -      -      +

