What you want to do is create a new dataframe that includes all the years.
> newdata <- data.frame( Year=1981:1988 )
> merge(fire, newdata, all=TRUE)
If you don't include the all=TRUE, then you only get the rows that are
contained in both datasets.
--
View this message in context:
http://r.789
dump and dput but have the same behavior but dump has an extra option
'evaluate'. From the documentation, 'evaluate=TRUE' looks like it should
force promises to be evaluated, ie convert 1:6 to be c(1,2,3,4,5,6).
I think that either my understanding of what a 'promise' is and what it
means to be
What I was expecting was for the second dump was:
foo <-
structure(c(1,2,3,4,5,6), .Dim = c(2L, 3L))
That is, I was expecting dump to expand the 1:6 and 2:3 into the actual
vectors.
--
View this message in context:
http://r.789695.n4.nabble.com/dump-not-evaluating-promises-tp2075859p2076059.
> however, the result is a list and i do not know whether more model fitting
> statistics (like p value of t test) is included in "result" or not. If i
> print the first element of resut i got the followings:
>
The structure command is extremely helpful here.
> str(result)
will give you all t
I'm using the dump command to pass data to WinBUGS/OpenBUGS/JAGS and have run
into a problem.
Here is some R-code:
foo <- array(1:6, dim=c(2,3))
dump('foo', file='dumpdata.R')
dump('foo', file='dumpdata.R', append=TRUE, evaluate=TRUE)
foo2 <- array(c(2,3,5,7,9,7,5,3), dim=c(2,4))
dump('foo2', fil
I can't recommend that book
highly enough.
Derek
pinkdd wrote:
>
> Thank you. D Sonderegger.
> Did you mean use
>
> bs <- bs(X, knots = spl$fit$knot)
> H <- predict(bs, X)
>
> Then H should be the matrix for the original data under the smoothing
> spline ba
I believe that smooth.spline fits a cubic B-spline to the data. So you just
need to know the knot points (which are returned by smooth.spline as
spl$fit$knot) and then use the bs() function in the splines library.
pinkdd wrote:
>
> Anybody knows how to generate the basis matrix for smoothing s
I have found myself doing a large amount of Bayesian analysis and I am
uncertain what framework learn and I'm posing this question to get a sense
of perspective. As I am doing a lot of applied work right now, I need to do
a fair amount of "standard data analysis" (eg mixed models, glm, etc) but I
8 matches
Mail list logo