library(janitor)
library(lubridate)
library(tidyverse)
library(readxl)
library(tidyquant)
library(openxlsx)
library(dplyr)
library("writexl")
install.packages("openxlsx", dependencies = TRUE)
library(openxlsx)
Viewing <- read_csv("ViewingActivity.csv")
Viewing %>%
arrange(Duration)
openxlsx::write.xlsx(Viewing, "View3.xlsx")
I want to use code similar to the above to save the dataframe "Viewing" and order the whole file by increasing or decreasing "Duration" time. Then I would like to save the file as an xlsx file.
Please help or give tips. Thanks