I have two questions,
I am new to R and was using dplyr to summarize my data. below is my code but I think I used a long method, it could be shorter.
Workingdata <- select(cSVDATA, current_reading_type,consumption, bill,region_name, date,
custtype,anonid, groups, year, billmonth )
#Table 1 of summary statistics
UniqueID <- Workingdata %>% group_by(groups) %>% count(anonid, name = "Frequency")
FrequencyT <- UniqueID %>% group_by (groups) %>% summarise(Frequency = sum(Frequency))
Anonid <- UniqueID %>% group_by(groups) %>% tally(name = "customers")
output2 <- left_join(Anonid,FrequencyT, by = "groups")
print(output2)
Now, after getting my code right, I keep getting this error when knitting. Please note I have other codes before this and a bib file (I am writing a manuscript). See my knit error:
Quitting from lines 59-99 (Manuscript28thApril.Rmd)
Error in select(cSVDATA, current_reading_type, consumption, bill, region_name, :
unused arguments (current_reading_type, consumption, bill, region_name, date, custtype, anonid, groups, year, billmonth)
Calls: <Anonymous> ... handle -> withCallingHandlers -> withVisible -> eval -> eval
In addition: Warning messages:
1: package 'ggplot2' was built under R version 4.0.5
2: package 'ggpubr' was built under R version 4.0.5
3: package 'broom' was built under R version 4.0.5
4: package 'AICcmodavg' was built under R version 4.0.5
5: package 'dplyr' was built under R version 4.0.5
6: package 'multcomp' was built under R version 4.0.5
7: package 'TH.data' was built under R version 4.0.5
8: package 'MASS' was built under R version 4.0.5
9: package 'tibble' was built under R version 4.0.5
10: package 'tidyr' was built under R version 4.0.5
Execution halted