re: Posit Cloud
Hello, I've uploaded an Excel spreadsheet with over 800,000 rows which, while it was in Excel, I was able to quickly create a new column to populate with "dates are equal" or "dates are not equal" in regards to two other columns with dates. Most of those dates are the same, but about 5,000 aren't and those are the ones denoted in the new column with "dates are not equal". When I try to remove the entire row of each of those 5,000, it takes too long, so I uploaded this spreadsheet to RStudio to use the read, filter, and write functions to return the document with those 5,000 rows removed. I installed and loaded the readxl() and writexl() functions. The column I created is named dates_temp. Looking at the code attempts, can you tell what function I should be using or if I'm writing this code incorrectly? Here's the coding and error messages if you don't see the URL above:
data <- read_excel("cyclistic_july_2022_dates.xlsx")
New names:
• `` ->...3
•started_at
->started_at...4
•started_at
->started_at...5
•ended_at
->ended_at...6
•ended_at
->ended_at...8
filtered_data <- data %>% filter(dates_temp == "dates are not equal")
Error in data %>% filter(dates_temp == "dates are not equal") :
could not find function "%>%"
filtered_data <- data(dates_temp == "dates are not equal")
Warning message:
In data(dates_temp == "dates are not equal") :
data set ‘dates_temp == "dates are not equal"’ not found
filtered_data <- filter(dates_temp == "dates are not equal")
Error: object 'dates_temp' not found