I run the following code in R:
boxcox(data, lambda = seq(-2,2), interp=TRUE, plotit=TRUE)
Where data is a vector of integers, but I get the error
Error: $ operator is invalid for atomic vectors
How can I fix this? Furthermore, how can I specify how much I want the lambda to increment by?