I'm using RStudio to create glm's of a csv dataset and I'm really new to R (Using it for a Uni assignment). Quick summary, it's looking at some motor claim data. I've read.csv the dataset into R;
Motor <- read.csv("motor.csv", quote="", header=TRUE)
then am trying to run
(ClaimsTab <- table(Claims))
to create a table to see the frequency of different claim amounts.
'Claims' is a header in my CSV file and there's no spelling mistakes but am returned with
Error in table(Claims) : object 'Claims' not found
I've attempted to attach a picture of my dataset.
What am I doing wrong? I imported a different file earlier and the table() function was working fine.
dput(head(Motor, 10))
, however you can always hash an specific column by using$
, I suggest you can try :ClaimsTab <- table(Motor$Claims)
– AlvaroMartinez