Last data update: 2014.03.03
|
R: Multi-Dimensional Meshgrid
Multi-Dimensional Meshgrid
Description
Inputs a list of vectors, and returns a list of vectors
such that every possible combination of input vector values occurs
once in the output.
Usage
meshgridn(L)
Arguments
Value
List of vectors of equal length such that each combination of elements
drawn from the input vectors occurs exactly once in the output list.
Author(s)
Jake Anderson
Examples
meshgridn(list(1:5, 10:12, 100:104))
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(AtmRay)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/AtmRay/meshgridn.Rd_%03d_medium.png", width=480, height=480)
> ### Name: meshgridn
> ### Title: Multi-Dimensional Meshgrid
> ### Aliases: meshgridn
> ### Keywords: misc
>
> ### ** Examples
>
> meshgridn(list(1:5, 10:12, 100:104))
[[1]]
[1] 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3
[39] 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5
[[2]]
[1] 10 10 10 10 10 11 11 11 11 11 12 12 12 12 12 10 10 10 10 10 11 11 11 11 11
[26] 12 12 12 12 12 10 10 10 10 10 11 11 11 11 11 12 12 12 12 12 10 10 10 10 10
[51] 11 11 11 11 11 12 12 12 12 12 10 10 10 10 10 11 11 11 11 11 12 12 12 12 12
[[3]]
[1] 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 101 101 101 101
[20] 101 101 101 101 101 101 101 101 101 101 101 102 102 102 102 102 102 102 102
[39] 102 102 102 102 102 102 102 103 103 103 103 103 103 103 103 103 103 103 103
[58] 103 103 103 104 104 104 104 104 104 104 104 104 104 104 104 104 104 104
>
>
>
>
>
> dev.off()
null device
1
>
|