Re: [R] Tying to underdressed the magic of lm redux

2019-06-01 Thread Uwe Ligges
Simply quote the colnames in the call, i.e.: demo("a", "b", df) Best, Uwe Ligges On 02.06.2019 03:43, Sorkin, John wrote: Colleagues, Despite Bert having tried to help me, I am still unable to perform a simple act with a function. I want to pass the names of the columns of a dataframe along

Re: [R] Tying to underdressed the magic of lm redux

2019-06-01 Thread Berry, Charles
John, I believe the pieces you are missing are filed under 'computing on the language', 'passing unevaluated objects', and 'language objects'. Forgive me if I belabor things you already know. lm, transform, and many other functions do their "magic" by operating on language objects. You migh

Re: [R] Tying to underdressed the magic of lm redux

2019-06-01 Thread Richard O'Keefe
PS: lm records a copy of the call in its result, but has no other use for any name the data frame may have had. On Sun, 2 Jun 2019 at 14:45, Richard O'Keefe wrote: > You can find the names of the columns of a dataframe using > colnames(my.df) > A dataframe is a value just as much as a number

Re: [R] Tying to underdressed the magic of lm redux

2019-06-01 Thread Richard O'Keefe
You can find the names of the columns of a dataframe using colnames(my.df) A dataframe is a value just as much as a number is, and as such, doesn't _have_ a name. However, when you call a function in R, the arguments are not evaluated, and their forms can be recovered, just as "plot" does. In f

Re: [R] Tying to underdressed the magic of lm redux

2019-06-01 Thread Bert Gunter
Hint: > all.vars(a) Error in all.vars(a) : object 'a' not found > all.vars(quote(a)) ## protects "a" from evaluation; quote(a) is a symbol expression [1] "a" > all.vars(~a) ## a formula expression [1] "a" -- Bert On Sat, Jun 1, 2019 at 6:43 PM Sorkin, John wrote: > Colleagues, > > Despite

Re: [R] Tying to underdressed the magic of lm redux

2019-06-01 Thread Sorkin, John
Colleagues, Despite Bert having tried to help me, I am still unable to perform a simple act with a function. I want to pass the names of the columns of a dataframe along with the name of the dataframe, and use the parameters to allow the function to access the dataframe and modify its contents.

Re: [R] How to specify distribution of forecast predictions?

2019-06-01 Thread Jeff Newmiller
https://stat.ethz.ch/pipermail/r-help/2008-July/168230.html or ggplot2::geom_ribbon On June 1, 2019 12:36:18 PM PDT, Michael Howell wrote: >Good afternoon, >I know that packages like r-forecast will create confidence intervals >for >forecasts which can then be plotted. However I am doing someth

[R] How to specify distribution of forecast predictions?

2019-06-01 Thread Michael Howell
Good afternoon, I know that packages like r-forecast will create confidence intervals for forecasts which can then be plotted. However I am doing something experimental and would like to specify my own prediction distributions and then graph them. Can anyone tell me if there is some package or func