In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2025-11-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
In this article, the editor introduces in detail "how to create an array in R language". The content is detailed, the steps are clear, and the details are handled properly. I hope this article "how to create an array in R language" can help you solve your doubts. Let's follow the editor's ideas to learn new knowledge.
Array is a generalization of vectors and matrices, which is multi-dimensional (three-dimensional or more) data. Like vectors and matrices, the elements of an array must be the same type of data. For example-if we create an array of dimensions (2dy3 and 4), we will create four rectangular matrices, each with two rows and three columns.
Create an array
In R, you usually use the array () function to create an array. The prototype of array () is:
Array (data = NA, dim = length (data), dimnames = NULL)
Where: data given array elements, by default is the dimension that NA;dim uses to specify the array, by default is an one-dimensional array; dimnames sets the name of each dimension, which must be a list, and there is no name by default.
For example, create an array of two 3x3 matrices, each with three rows and three columns.
# Create two vectors of different lengths.vector1
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.