Re: [R] assign $y of predict() function output to variable

2011-05-18 Thread David Winsemius
On May 18, 2011, at 1:35 PM, Asan Ramzan wrote: Hello R-help Below is the output from the predict() function. How can I assign $y to a variable. Newvar <- predict(function,df2)$y -- David. $x V1 1 36.28 2 34.73 3 33.74 4 69.87 5 58.88 6 89.44 7 43.97 8 41.94 9

[R] assign $y of predict() function output to variable

2011-05-18 Thread Asan Ramzan
Hello R-help Below is the output from the predict() function. How can I assign $y to a variable. >predict(function,df2) $x    V1 1   36.28 2   34.73 3   33.74 4   69.87 5   58.88 6   89.44 7   43.97 8   41.94 9   33.34 10  38.47 11  35.16 12  42.94 13  46.76 14  53.24 15  52.43 16  50.40 17