[R] Integration of vector syntax unknown
Jeff Newmiller
jdnewmil at dcn.davis.CA.us
Sat Mar 23 06:51:45 CET 2013
You hope it makes sense, but it doesn't to me. Can you describe it without the multiple instances? Your last equation in particular seems confusing (e.g. undefined variable N, integrating by a variable N_1 to a limit of N_1, what is a_2 and why is it being used to determine gamma_1).
For clarity, R can do a lot of things vectorially, but multiple parallel integrations is not something R has an unusually simple or fast ability to accomplish.
---------------------------------------------------------------------------
Jeff Newmiller The ..... ..... Go Live...
DCN:<jdnewmil at dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software/Embedded Controllers) .OO#. .OO#. rocks...1k
---------------------------------------------------------------------------
Sent from my phone. Please excuse my brevity.
Benjamin Sabatini <art_archaeology at yahoo.com> wrote:
>Hello,
>
>I'm very new to using R, but I was told it could do what I want. I'm
>not sure how best to enter the information but here goes...
>
>I'm trying to transfer the following integral into R to solve for
>ln(gamma_1), on the left, for multiple instances of gamma_i and
>variable N_i.
>
>gamma_i is, for example, (0, 0.03012048, 0.05000000, 0.19200000,
>0.44000000, 0.62566845)
>
>N_i (N_1 or N_2) is between 0 and 1 so that N_1+N_2=1, so if
>N_1=(0,.166,.180,.250,.325,.374), then N_2=(1.000, 0.834, 0.820, 0.750,
>0.675, 0.626)
>
>a_i (a_1 or a_2)
>
>
>So, for gamma_i (in this case gamma_2), N_i (N_2), and a_i (a_2) first
>the following
>
>a_i = ln(gamma_i)/(1-N_i)^2
>
>then,
>
>ln(gamma_1) = -a_2*N_1*N*2 - integration (from N_1=1, to N_1) a_2 dN_1
>
>
>I hope that makes sense...
>
>______________________________________________
>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.
More information about the R-help
mailing list