Platform
Resources
Pricing
Sign in
Get started
David Kirkby
Workspace
Fork
Published
Utilities
By
David Kirkby
Edited
Jan 17, 2022
Importers
2 stars
Insert cell
Insert cell
arrayeq
(
[
1
,
2
]
,
[
1
,
2
]
)
Insert cell
arrayeq
(
[
1
,
2
]
,
[
2
,
1
]
)
Insert cell
arrayeq
(
1
,
1
)
Insert cell
arrayeq
(
"abc"
,
"abc"
)
Insert cell
arraycat
(
[
1
,
2
,
3
]
,
[
4
,
5
]
)
Insert cell
arraycat
(
[
1
,
2
,
3
]
,
[
]
)
Insert cell
arraydel
(
[
1
,
2
,
3
]
,
2
)
Insert cell
// First arg must support splice, so cannot be a typed array.
//arraycat(new Int32Array([1,2,3]), [4,5])
Insert cell
arraycat
(
[
1
,
2
,
3
]
,
new
Int32Array
(
[
4
,
5
]
)
)
Insert cell
// must have at least one arg
//arraycat()
Insert cell
// deleted object must exist
//arraydel([1,2,3], 4)
Insert cell
tidy
(
{
a
:
[
1
,
2
,
3
]
,
b
:
[
4
,
5
,
6
]
}
)
Insert cell
// column arrays must all have the same length
//tidy({a:[1,2,3], b:[4,5]})
Insert cell
interleave
(
[
0
,
3
,
6
]
,
[
1
,
4
,
7
]
,
[
2
,
5
,
8
]
)
Insert cell
// Type of first input array determines result type.
interleave
(
new
Int32Array
(
[
0
,
2
]
)
,
[
1
,
3
]
)
Insert cell
// All input arrays must have the same length.
//interleave([0,2,4],[1,3])
Insert cell
interleave
(
)
Insert cell
// interpret an array as a matrix and gather its rows (default) or columns
gather
(
[
0
,
1
,
2
,
3
,
4
,
5
]
,
2
)
Insert cell
gather
(
[
0
,
1
,
2
,
3
,
4
,
5
]
,
2
,
'cols'
)
Insert cell
// gather by columns is the inverse of interleave
gather
(
interleave
(
[
0
,
3
,
6
]
,
[
1
,
4
,
7
]
,
[
2
,
5
,
8
]
)
,
3
,
'cols'
)
Insert cell
transpose
(
[
[
0
,
1
]
,
[
2
,
3
]
,
[
4
,
5
]
]
)
Insert cell
transpose
(
transpose
(
[
[
0
,
1
]
,
[
2
,
3
]
,
[
4
,
5
]
]
)
)
Insert cell
transpose
(
[
new
Int32Array
(
[
0
,
1
,
2
]
)
,
new
Int32Array
(
[
3
,
4
,
5
]
)
]
)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Try it for free
Learn more
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
transpose
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
gather
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
interleave
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
arraycat
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
arraydel
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
arrayeq
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
tidy
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML