ez.recols: reorder all cols, or sort all cols alphabetically

View source: R/frame.R

ez.recolsR Documentation

reorder all cols, or sort all cols alphabetically

Description

reorder all cols, or sort all cols alphabetically

Usage

ez.recols(df, newColOrder, col = NULL)

Arguments

newColOrder

c(”,”,”), number of cols must match that of all cols (when para col=NULL) or specified by para col. or, newColOrder='az' or 'za', sort all cols alphabetically

col

NULL=all columns, otherwise restricted to specified cols, eg, ( internally evaluated by eval('dplyr::select()') )
'c(sample_num,mother_num)' (quoted) or c("sample_num","mother_num") (not quoted)
1:4 (not quoted)
'col1:col3' (quoted)
'-(ABCB1_c1236t:pgp_rs2032582)', '-c(neonate_admit_NICU,BDNF)' (quoted)

Value

returns a new df, old one does not change

See Also

gather, spread, separate, unite
select, slice
distinct, arrange
summarise, count, mutate
group_by, left_join, right_join, inner_join, full_join, semi_join, anti_join
intersect, union, setdiff
bind_rows, bind_cols

Other data transformation functions: ez.2char(), ez.2factor(), ez.2label(), ez.2long(), ez.2lower(), ez.2value(), ez.2wide(), ez.compute(), ez.del(), ez.label.get(), ez.label.set(), ez.labels.get(), ez.labels.set(), ez.move(), ez.newcol(), ez.num(), ez.recode(), ez.recol(), ez.rename(), ez.replace(), ez.rncols(), ez.rncol(), ez.select(), ez.sort(), ez.split(), ez.str(), ez.unique(), left_join()


jerryzhujian9/ezmisc documentation built on March 9, 2024, 12:44 a.m.