User Tools

Site Tools


sort_by_date_or_value

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

sort_by_date_or_value [2015/09/21 16:43] (current)
vincenzo created
Line 1: Line 1:
 +For Dates, specify the format:
  
 +By date
 +<code r>
 +data <- data[order(as.Date(data$Day,​ format='​%Y-%m-%d'​)),​]
 +</​code>​
 +
 +Or in general:
 +<code r>
 +data <- data[order(data$value),​]
 +</​code>​
sort_by_date_or_value.txt ยท Last modified: 2015/09/21 16:43 by vincenzo