[R] How does once import a function from an imported script?
Aimee Jones
alj27 at hoyamail.georgetown.edu
Thu Nov 10 03:11:44 CET 2011
Hi all,
I am trying to import some functions into a script and am having
difficulty in doing so. I am able to import a series of functions from
a .tex file into my script, and call on each function by column name,
however R reads them as data rather than as functions and I am
struggling with the syntax to make R read them as a function instead.
Below is a small set of the things I have tried:
parms["B1"]
returns the character string {2*dnorm(T1(t),mean=32.5,sd=7)} . This is
from the imported script "parms".
when I write B1<-function(T1,t) (parms["B1"]) and then enter B1 to see
what the workspace returns, I get
function(T1,t) (parms["B1"])
I am trying to get B1 to return as function(T1,t)
{2*dnorm(T1(t),mean=32.5,sd=7)}, so that I can plot B1(T1,t).
Is there any way to do this?
Thank you for your assistance and patience,
yours sincerely,
Aimee Jones
More information about the R-help
mailing list