DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR R
r - reorder columns in data frame
# Reorder by column name df <- df[c("A", "B", "C")] # Reorder by column index df <- df[c(1, 3, 2)]
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#reorder
#columns
#data
#frame
ADD COMMENT
Topic
COMMENT
Name
8+6 =
Submit