combine.datasets: Combine datasets

View source: R/functions.R

combine.datasetsR Documentation

Combine datasets

Description

Combine two datasets, add new columns absent in each of them and fill them with specified value.

Usage

combine.datasets(df1, df2, value = 0)

Arguments

df1

first data.frame to combine.

df2

second data.frame to combine.

value

value which should fill missing columns.

Details

this function is useful to rbind two data.frames with different columns.

Value

combined data.frame.

Examples

df1 <- data.frame(A=1:10, B=11:20, C=21:30)
df2 <- data.frame(E=1:10, C=11:20, B=21:30)
combine.datasets(df1, df2)

DrrDom/pfpp documentation built on Dec. 28, 2024, 9:56 a.m.