[R] Extracting formulae from expression() / deriv()

Henrique Dallazuanna wwwhsd at gmail.com
Tue Apr 6 16:09:21 CEST 2010


df1p is a expression, and you can use later.

On Tue, Apr 6, 2010 at 11:00 AM, nickymcp <nickymcpherson at gmail.com> wrote:
>
> Thanks for your help - this works and I get
>
>> s <- 2
>> c <- 3
>> a <- 2
>> P <- 1
>> attributes(eval(df1p))$gradient[,'P']
>  P
> -2
>
> What I really wanted was an expression that I can use later - do you think
> there's any way to do this?
>
> --
> View this message in context: http://n4.nabble.com/Extracting-formulae-from-expression-deriv-tp1752738p1752856.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O



More information about the R-help mailing list