% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{sort_tweets}
\alias{sort_tweets}
\title{Ordenar Tweets}
\usage{
sort_tweets(tweets, by = "date", decreasing = TRUE)
}
\arguments{
\item{tweets}{Lista de tweets}

\item{by}{Campo por el cual ordenar ("date", "like_count", "retweet_count", "views_count")}

\item{decreasing}{Orden descendente (default: TRUE)}
}
\value{
Lista ordenada de tweets
}
\description{
Ordena tweets por algun criterio
}
\examples{
\donttest{
tweets <- list(
  list(id = "1", date = as.POSIXct("2026-01-01"), like_count = 2),
  list(id = "2", date = as.POSIXct("2026-02-01"), like_count = 10)
)
class(tweets) <- c("twscraper_tweets", "list")
top_tweets <- sort_tweets(tweets, by = "like_count")
}
}
