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 and W1 only and N2--N40 and W2--W40 would be missing. The last record would be full. I've tried using mapply but it returns something like this:
[,1] [,2] [,3] [,4] [,5] [,6] [,7] nodes 1 Numeric,2 Numeric,3 Numeric,4 Numeric,5 Numeric,6 Numeric,7 weights 1 Numeric,2 Numeric,3 Numeric,4 Numeric,5 Numeric,6 Numeric,7 I have no idea how to get this into a format I can export and later use. Thanks for your help. -- View this message in context: http://r.789695.n4.nabble.com/mapply-then-export-tp4041345p4041345.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.