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

deprecated rownames2column and rify_names

parent d85f9289
......@@ -148,10 +148,8 @@ vec2df <- function(namedVec) data.frame(name=names(namedVec), value=namedVec, ro
rownames2column <- function(df, colname){
df <- as.df(df)
df$tttt <- rownames(df);
rownames(df) <- NULL;
plyr::rename(df, c(tttt=colname))
warning("DEPRECATED Use dplyr::add_rownames directly")
add_rownames(df, var=colname)
}
......@@ -191,7 +189,13 @@ set_names <- function(df, ...){
#iris %>% set_names("setosa", "hallo") %>% head
rify_names <- function(df){ names(df) <- names(df) %>% str_replace_all(c(" "="_", "-"="_")); df}
rify_names <- function(df){
warning("DEPRECATED: use pretty_columns instead");
names(df) <- names(df) %>% str_replace_all(c(" "="_", "-"="_"));
df
}
pretty_columns <- function(df){ names(df) <- names(df) %>% str_replace_all(c(" "="_", "-"="_", "[.]"="_")) %>% tolower; df}
head_html <- function(df, n=5) head(df, n) %>% knitr::kable(format="html") %>% print()
......
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