\begin{Schunk}
\begin{Sinput}
 x <- c(1, 2, 3, 4, 6)
 y <- c(44, 12, 44, 22, 4)
 attributes(x)
\end{Sinput}
\begin{Soutput}
NULL
\end{Soutput}
\begin{Sinput}
 attr(x, "hi") <- paste("Oh, my hearty friend, I greet  you warmly", rnorm(6))
 attr(x, "areg") <- lm(y ~ x)
 attributes(x)
\end{Sinput}
\begin{Soutput}
$hi
[1] "Oh, my hearty friend, I greet  you warmly 0.585528817843856"  "Oh, my hearty friend, I greet  you warmly 0.709466017509524"  "Oh, my hearty friend, I greet  you warmly -0.109303314681054"
[4] "Oh, my hearty friend, I greet  you warmly -0.453497173462763" "Oh, my hearty friend, I greet  you warmly 0.605887455840394"  "Oh, my hearty friend, I greet  you warmly -1.81795596770373" 

$areg

Call:
lm(formula = y ~ x)

Coefficients:
(Intercept)            x  
     44.919       -6.162  
\end{Soutput}
\begin{Sinput}
 summary(attr(x, "areg"))
\end{Sinput}
\begin{Soutput}
Call:
lm(formula = y ~ x)

Residuals:
      1       2       3       4       5 
  5.243 -20.595  17.568   1.730  -3.946 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)  
(Intercept)   44.919     15.216   2.952   0.0599 .
x             -6.162      4.188  -1.471   0.2376  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 16.11 on 3 degrees of freedom
Multiple R-squared:  0.4191,	Adjusted R-squared:  0.2255 
F-statistic: 2.165 on 1 and 3 DF,  p-value: 0.2376
\end{Soutput}
\end{Schunk}
