Perhaps something like:
sapply(1:40, function(n) c(gauss.quad(n)$nodes, rep(NA, 40-n)))
sapply(1:40, function(n) c(gauss.quad(n)$weights, rep(NA, 40-n)))
You'll have to decide how you want the records combined but this
should get you going in the right direction
Michael
PS -- it's polite to say
To use the gauss.quad function: gauss.quad(n,type) which returns two lists
$nodes and $weights whose length will each equal n. I'd like to do this for
n=1 to 40 (type will not change) and have a dataset with 40 rows and 81
columns with all the nodes and weights. The first record would have N1 a
2 matches
Mail list logo