cbind_filler: Combine data frames and/or vectors filling in missing rows...

Description Usage Arguments Value Author(s) Examples

View source: R/cbind_filler.R

Description

Alternative to cbind or cbind.fill. Enables combining multiplt different data frames or vectors

Usage

1
cbind_filler(input)

Arguments

input

list of data frames or vectors

Value

output is a combined data frame

Author(s)

Zofia Wicik

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
#example data frame
dat1<- data.frame(miRNA=c('hsa-miR-195-5p', 'hsa-miR-4753-3p', 'hsa-miR-497-5p',
'hsa-miR-106a-5p', 'hsa-miR-195-5p', 'hsa-miR-4753-3p'), A=c(TRUE,TRUE,FALSE, TRUE, FALSE, FALSE))
dat2<- data.frame(miRNA=c('hsa-miR-195-5p', 'hsa-miR-4753-3p',
'hsa-miR-497-5p', 'hsa-miR-106a-5p'),  C=c(TRUE,TRUE,FALSE,FALSE))
dat3<- data.frame(miRNA=c('hsa-miR-195-5p', 'hsa-miR-4753-3p',
'hsa-miR-3612', 'hsa-miR-1343'),  D=c(TRUE,TRUE,FALSE,FALSE))
input<- list(dat1,dat2,dat3)
temp<- cbind_filler(input)



#example vectors of strings
dat1<-c('hsa-miR-195-5p', 'hsa-miR-4753-3p', 'hsa-miR-497-5p', 'hsa-miR-106a-5p', 'hsa-miR-195-5p')
dat2<-c('hsa-miR-497-5p', 'hsa-miR-106a-5p', 'hsa-miR-195-5p')
dat3<- data.frame(miRNA=c('hsa-miR-195-5p', 'hsa-miR-4753-3p',
'hsa-miR-3612', 'hsa-miR-1343'),  D=c(TRUE,TRUE,FALSE,FALSE))

input<- list(dat1,dat2,dat3)
temp<- cbind_filler(input)

wizbionet/wizbionet documentation built on Sept. 9, 2020, 12:45 a.m.