Hey Guys,
I am getting a weird error message. My code was working and then I changed the csv file to an updated version with a "category" column. I then added the column "category" to my select line and my group_by line. Sadly I cannot post the data itself because it is confidential but any help would be much appreciated. Code posted below.
library(readr)
library(dplyr)
library(tidyr)
library(stringr)
library(lubridate)
library(reprex)
library(tidyverse)
library(quantreg)
top25000 <- read_csv("index_sales_export.csv")
blue_chips <- top25000 %>%
select(graded_title,date,price,vcp_card_grade_id) %>%
filter(date >= as.Date("2018-07-08")) %>%
group_by(graded_title,
vcp_card_grade_id) %>%
summarise(Market_Cap = sum(price),
Average_Price = mean(price),
count=n(),
Standard_Deviation = sd(price),
SD_over_Price = (Standard_Deviation/Average_Price)) %>%
filter(Market_Cap >= 10000 & count >= 25) %>%
rename(Total_Number_of_Sales = count)
blue_chips <- blue_chips[order(-blue_chips$SD_over_Price), ]
blue_chips
ungroup_blue_chips <- top25000 %>%
filter(graded_title %in% blue_chips$graded_title) %>%
select(graded_title,date,price,vcp_card_grade_id)
head(ungroup_blue_chips)
The error message I am getting is
Error in sports_top25000 %>% select(graded_title, date, price, vcp_card_grade_id, :
could not find function "%>%<-"