Data update

This commit is contained in:
Ingy döt Net 2026-04-30 12:34:36 -04:00
parent 4bb20c9b71
commit cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions

View file

@ -0,0 +1,12 @@
#Creating an array
arr <- array(1:120, dim=c(5, 4, 3, 2))
#Setting and accessing a single element
arr[1, 1, 1, 1] <- 1000
arr[1, 1, 1, 1]
#Accessing a range of elements (leaving an index blank means you access all elements in that dimension)
arr[3:5,1,2,]
#Reshaping
dim(arr) <- c(2, 3, 4, 5)
#Adding dimensions to a vector
x <- 1:16
dim(x) <- rep(2, 4)