As Nick suggested, you're confusing the name of an object with the name(s)
of its elements.
Study this example:
>
> lamda <- 0.2
> lamda
[1] 0.2
> lamda <- c(g=0.2)
> lamda
g
0.2
> lamda <- c(1,3,4)
> lamda
[1] 1 3 4
> lamda <- c(g=1, x=3, foo=4)
> lamda
g x foo
1 3 4
lamda
wink: A1.056, Coupure Links 653, 9000 Gent
ring: 09/264.59.36
-- Do Not Disapprove
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Mike Gibson
Sent: vrijdag 26 november 2010 9:13
To: r-help@r-project.org
Subject: [R] small problem in coding
Euu...
g <- 0.2
Q <- exp(g)
or
lamda <- c(g=0.2)
exp(lamda)
Ivan
Le 11/26/2010 09:12, Mike Gibson a écrit :
I must be missing something.
I first state my g parameter with:
lamda<-c(g=0.2)
However, when I do the next step R is telling me "object g not found" Here is
my next step:
Q<-e
I must be missing something.
I first state my g parameter with:
> lamda<-c(g=0.2)
However, when I do the next step R is telling me "object g not found" Here is
my next step:
> Q<-exp(g)
???
Any help would be greatly appreciated.
Mike
4 matches
Mail list logo