the df I'm working on originally is a long format table like below:-
VALUE | Gene_Symbol | Sample_ID |
---|---|---|
12253 | BRCA | P1 |
42356 | CAMP | P2 |
Then for generating the DGEList, I decided to transform it into a wide format and generated below table:
P1 | P2 | P3 | P4 | |
---|---|---|---|---|
null | 2423 | 46456 | 74564 | 523424 |
CAMP | 42356 | |||
BRCA | 12253 | 453 | 658665 |
because some samples may not express a certain gene, hence the console leave it blank when I wide pivot it. When I view() the df, it showed as blank. But when I do summery() it shows as NULL in the console.
Right now, I am trying to use apply() to replace the blank with 0 but with no luck, all values turned into 0.