Commit a1ab1632 authored by Holger Brandl's avatar Holger Brandl
Browse files

better support for matrices in set_names

parent cf4fa28c
...@@ -127,7 +127,7 @@ push_left <- function(df, pushColNames){ ...@@ -127,7 +127,7 @@ push_left <- function(df, pushColNames){
set_names <- function(df, ...){ set_names <- function(df, ...){
#browser() #browser()
newnames <- as.character(unlist(list(...))) newnames <- as.character(unlist(list(...)))
names(df) <- newnames; colnames(df) <- newnames;
return(df) return(df)
} }
#iris %>% set_names(c("setosa", "hallo")) %>% head #iris %>% set_names(c("setosa", "hallo")) %>% head
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment