Skip to content
Back to formatted view

Raw Message

Message-ID: <971536df0901110842v7b4e4e4fv1b40ef5b234bfd38@mail.gmail.com>
Date: 2009-01-11T16:42:10Z
From: Gabor Grothendieck
Subject: help me
In-Reply-To: <3de40b430901110813o6b498b9ah564081d9c502e791@mail.gmail.com>

Do you mean how to create an R function, CD, that
represents the resulting function of x?   If that's it
then try this:

> CD <- function(x) {}
> body(CD) <- yacas("Integrate(y,0,1-x)2 - x - y - 1")[[1]]
> CD
function (x)
(1 - x)^2 - (1 - x)^2/2

See ?bodyAsExpression for more info.  Also try:
    demo("Ryacas-Function")


On Sun, Jan 11, 2009 at 11:13 AM, jolka sukyte <jolcka at gmail.com> wrote:
> Hello,
>
> Can You help me? How to save this functions in cd:
>
> install.packages("Ryacas", dep = TRUE)
> library(Ryacas)
> yacasInstall()
> yacas("Integrate(z,1,2-x-y)1")
> yacas("Integrate(y,0,1-x)2 - x - y - 1")
> yacas("Integrate(x,0,1)(1 - x)^2 - (1 - x)^2/2")
>
> Thanks You,
> Sincerely, Jolka
>
> ______________________________________________
> 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.
>