Why am I getting " attempt to use zero-length variable name" error in my code?

Hi gus,

I am still very new to RStudio and am trying to run some code that has worked in the past with my other datasets, but is not currently working.

logit <- read.csv("uncomplete_responses_removed.csv")

colnames(logit)

logit = read.csv("uncomplete_responses_removed.csv", fileEncoding = "Latin1", check.names = F)

fit <- glm(Study_Year ~ ADA, data = logit, family = binomial)
summary(fit)

The error code exactly is:

Error in terms.formula(formula, data = data) :
attempt to use zero-length variable name

Thanks!

Hi, what does your dataset logit look like? Can you provide a reproducible example (we don't have your csv file).

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.