Re: [R] [External] Creating model formulas programmatically

2025-04-05 Thread Bert Gunter
Thanks, Rich. I thought of that, too, but it violates the spirit of my restraints (to avoid character strings), which I unfortunately did not clearly articulate. So my apologies for that failure. My concern is that with more complex model formula, using as.formula, etc. to parse/convert character

Re: [R] [External] Creating model formulas programmatically

2025-03-30 Thread Ebert,Timothy Aaron
variables. Rejoin the dependent variable to the data frame. Pass that to reformulate. Tim -Original Message- From: Rui Barradas Sent: Sunday, March 30, 2025 4:05 AM To: Ebert,Timothy Aaron ; Bert Gunter ; Richard M. Heiberger ; R-help Subject: Re: [R] [External] Creating model formulas progr

Re: [R] [External] Creating model formulas programmatically

2025-03-30 Thread Duncan Murdoch
where R can assume that the first variable is the dependent variable and all others are independent variables, I see no way of processing that within the current modeling system without generating a formula (a string) that gets parsed. -Original Message- From: R-help On Behalf Of Rich

Re: [R] [External] Creating model formulas programmatically

2025-03-30 Thread Rui Barradas
gful way. The best I can do is to try to hide the string from you. Tim -Original Message- From: R-help On Behalf Of Bert Gunter Sent: Saturday, March 29, 2025 6:40 PM To: Richard M. Heiberger ; R-help Subject: Re: [R] [External] Creating model formulas programmatically [External Emai

Re: [R] [External] Creating model formulas programmatically

2025-03-29 Thread Bert Gunter
eling system without generating a > formula (a string) that gets parsed. > > -Original Message- > From: R-help On Behalf Of Richard M. > Heiberger > Sent: Saturday, March 29, 2025 8:47 PM > To: Bert Gunter > Cc: R-help > Subject: Re: [R] [External] Creating model

Re: [R] [External] Creating model formulas programmatically

2025-03-29 Thread Ebert,Timothy Aaron
om: R-help On Behalf Of Richard M. Heiberger Sent: Saturday, March 29, 2025 8:47 PM To: Bert Gunter Cc: R-help Subject: Re: [R] [External] Creating model formulas programmatically [External Email] my take of the assignment was to avoid 'parse' specifically. we start with a chara

Re: [R] [External] Creating model formulas programmatically

2025-03-29 Thread Richard M. Heiberger
my take of the assignment was to avoid 'parse' specifically. we start with a character vector, so avoiding characters is not possible. i was dealing with the fortune "if parse is the answer, you have the wrong question" Sent from my iPhone On Mar 29, 2025, at 15:39, Bert Gunter wrote:  Thanks

Re: [R] [External] Creating model formulas programmatically

2025-03-29 Thread Ebert,Timothy Aaron
string from you. Tim -Original Message- From: R-help On Behalf Of Bert Gunter Sent: Saturday, March 29, 2025 6:40 PM To: Richard M. Heiberger ; R-help Subject: Re: [R] [External] Creating model formulas programmatically [External Email] Thanks, Rich. I thought of that, too, but it vio

Re: [R] [External] Creating model formulas programmatically

2025-03-29 Thread Richard M. Heiberger
> somenames <- c("Heigh", "Ho", "Silver", "Away") > as.formula(paste("~(",paste(somenames, collapse="+"),")^2")) ~(Heigh + Ho + Silver + Away)^2 > > On Mar 29, 2025, at 14:30, Bert Gunter wrote: > > somenames <- c("Heigh", "Ho", "Silver", "Away") __