Displaying 4 results from an estimated 4 matches for "expval".
2000 Aug 10
2
help with matrix creation
hi R-help!
I would like to know a simple and easy way (if posible) to do the following
data manipulation. I have a matrix of experimental data (with replicae in time)
>experiment<-data.frame(times=c(0,0,10,10,20,20,30,30),expval=c(1,1,2,2,3,3,4,4))
> experiment
times expval
1 0 1
2 0 1
3 10 2
4 10 2
5 20 3
6 20 3
7 30 4
8 30 4
and a set of simulated values
> simul<-data.frame(times=c(0,10,20,30),simul=c(3,4,5,6))
> simul
times simul
1...
2007 Jun 26
1
Subscripting specified variables in a function
I'm trying to create a function which will allow me to subset a data set
based on values of various specified variables. I also want to then
apply some other function(s) (e.g., summary).
This is what I've tried so far....
> test.fx <- function(dta, expvar, expval) {
+ newdta <- subset(dta, eval(expvar)>expval)
+ summary(newdta$eval(expvar))
+ }
>
> test.fx(fyc04s, quote(totexp04), 100)
Error in summary(newdta$eval(expvar)) : attempt to apply non-function
>
The subset works fine, but the my attempt to access the specified
variable...
2000 Aug 10
0
help with matrix creation (merging data frames)
...R-help!
>
> I would like to know a simple and easy way (if posible) to do the
following
> data manipulation. I have a matrix of experimental data (with replicae in
time)
actually, they seem to be data frames.
>
>
>experiment<-data.frame(times=c(0,0,10,10,20,20,30,30),expval=c(1,1,2,2,3,3,4,4)
)
>
> > experiment
> times expval
> 1 0 1
> 2 0 1
> 3 10 2
> 4 10 2
> 5 20 3
> 6 20 3
> 7 30 4
> 8 30 4
>
> and a set of simulated values
>
> > simul<-data...
2005 Jul 20
4
poisson fit for histogram
I haven't been an R lister for a bit, but I hope to enlist someone's
help here. I think this is a simple question, so I hope the answer
is not much trouble. Can you please respond directly to this email
address in addition to the list (if responding to the list is
warranted)?
I have a histogram and I want to see if the data fit a Poisson
distribution. How do I do this? It is