title: Error in lambda when running ridge
body: <p>I am running the following code but keep getting an error message. The code is from the ISLR website.</p>
  
  <pre><code>library(ISLR)
  Hitters=na.omit(Hitters)
  x=model.matrix(Salary~.,Hitters)[,-1]
  y=Hitters$Salary
  library(glmnet)
  ridge.mod=glmnet(x,y,alpha=0,lambda=grid)
  </code></pre>
  
  <p>Error message:</p>
  
  <pre><code>Error in lambda &lt; 0 : comparison (3) is possible only for atomic and list types
  </code></pre>
  
  <p>I would really appreciate any help. Thanks!</p>