Sort dataset by a column
iris = read.table(file="data/iris.txt", sep=" ", header=T, stringsAsFactors=T)
head(iris)
ord = order(iris$Sepal.Length)
head(iris[ord,])
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
iris = read.table(file="data/iris.txt", sep=" ", header=T, stringsAsFactors=T)
head(iris)
ord = order(iris$Sepal.Length)
head(iris[ord,])