title: R: why cannot find variables
body: <p>I am new to R and I think I missed something fundamentally. Why can't R find the variable which I supplied and didn't change? In another words, I cannot use my variable at all.</p>
  
  <pre><code>&gt; dat = read_sas("e:/Users/mhollifi/Desktop/cps/ex1_1/jan00pub.sas7bdat", "e:/Users/mhollifi/Desktop/cps/ex1_1/formats.sas7bcat")
  &gt; summary(PENATVTY)
  Error in summary(PENATVTY) : object 'PENATVTY' not found
  &gt; names(dat)
  [1] "PEEDUCA"     "PENATVTY"    "cntryorigin"
  &gt; print(dat)
  # A tibble: 96,589 x 3
     PEEDUCA PENATVTY cntryorigin
       &lt;dbl&gt;    &lt;dbl&gt;       &lt;dbl&gt;
   1    34.0     57.0           0
   2    40.0     57.0           0
   3    37.0     57.0           0
   4    37.0     57.0           0
   5    40.0     57.0           0
   6    39.0     57.0           0
   7    39.0     57.0           0
   8    39.0     57.0           0
   9    39.0     57.0           0
  10    43.0     57.0           0
  # ... with 96,579 more rows
  &gt; exists("PENATVTY")
  [1] FALSE
  &gt; summary(PENATVTY)
  Error in summary(PENATVTY) : object 'PENATVTY' not found
  &gt;   lapply(PENATVTY, mean, na.rm = TRUE)
  Error in lapply(PENATVTY, mean, na.rm = TRUE) : 
    object 'PENATVTY' not found
  </code></pre>