Learn R Programming

dunlin (version 0.1.9)

ls_unite: Unite Columns of a Table in a list of data.frame.

Description

Unite Columns of a Table in a list of data.frame.

Usage

ls_unite(adam_db, tab, cols, sep = ".", new = NULL)

Value

list of data.frames object with a united column.

Arguments

adam_db

(list of data.frames) to be transformed.

tab

(string) the name of a table in the adam_db object.

cols

(character) the name of the columns to unite.

sep

(string) the separator for the new column name.

new

(string) the name of the new column. If NULL the concatenation of cols separated by sep is used.

Examples

Run this code
db <- list(mtcars = mtcars, iris = iris)

x <- ls_unite(db, "mtcars", c("mpg", "hp"), new = "FUSION")
x$mtcars

Run the code above in your browser using DataLab