"object not found" for column name, csv file

Viewed 20

I imported a csv with two columns, and every function I try I get "object 'Gestation' not found" for my column name. I know someone else posted almost the same issue a while back, but the solution table(data$columnname)isn't working. I also don't want to create a vector with all the values of each column, because it would take forever. I've included the link to a screenshot of my data ([1]: https://i.stack.imgur.com/H9TZm.png)

library(readr)
library(dplyr)
library(tidyverse)
library(janitor)
gestation_data <- read_csv("Downloads/gestation_data.csv") 
table(gestation_data$Gestation)
table(gestation_data$Frequency)[enter image description here][1]
tot <- sum(Gestation * Frequency)
0 Answers
Related