Hi, I'm trying to do a simple favstats on a dataset with defined headers, but when I call the column I want using the header title it comes up with the error message for object not found. I've tried using header = TRUE to make sure the headers are there, and I've tried renaming the columns using col.names as well but nothing is working. I've also checked that there is no typographic error as well.
This is what my code looks like:
data <- read.csv(file = "data.csv", header = TRUE, col.names = c("A", "B", "C", "D", "E", "F", "G", "H", "I"))
favstats(C$data)
Error in rlang::is_formula(x) : object 'C' not found
I've also downloaded the following packages for later data analysis but I don't see that they would necessarily interfere? I'm not sure really
if(!"mosaic" %in% installed.packages()) install.packages("mosaic")
if(!"latticeExtra" %in% installed.packages()) install.packages("latticeExtra")
if(!"sf" %in% installed.packages()) install.packages("sf")
if(!"tidyverse" %in% installed.packages()) install.packages("tidyverse")
lapply(c("mosaic","latticeExtra","sf","tidyverse"), require, character.only = TRUE)
Any help is appreciated,
Thanks