Confusion over covariates

Hi
I have 23 grids where I trap Bandicoots. I have used one of the grid layouts (in this case wi20) as a “standard grid” so that I can use Session to estimate density across all my 23 grids. Using the script-
> library(secr)
> olddir<-setwd("~/Desktop")
> myALL<-read.capthist("isoodon with sex.txt", "wi20traps.txt", fmt="trapID", covnames=’sex’)
> secr.fit (myALL, model=list(D~session,g0~b,sigma~b), CL=FALSE, buffer=400, trace=FALSE)
This seems to work fine.
However, I am struggling with the script to incorporate sex as a covariate and then report on. When I try D~sex in the model I get an error message.
I am very new to R.
Thanks
I have 23 grids where I trap Bandicoots. I have used one of the grid layouts (in this case wi20) as a “standard grid” so that I can use Session to estimate density across all my 23 grids. Using the script-
> library(secr)
> olddir<-setwd("~/Desktop")
> myALL<-read.capthist("isoodon with sex.txt", "wi20traps.txt", fmt="trapID", covnames=’sex’)
> secr.fit (myALL, model=list(D~session,g0~b,sigma~b), CL=FALSE, buffer=400, trace=FALSE)
This seems to work fine.
However, I am struggling with the script to incorporate sex as a covariate and then report on. When I try D~sex in the model I get an error message.
I am very new to R.
Thanks