R Language-Arrays

Source: Internet
Author: User
Tags arrays

I. Concept

An array is an R data object that stores data in more than two dimensions, and the array can only store data types

Two. Create

Arr<-array (Data,dim)

Data represents the information, dim represents the dimension


Three. Element invocation


Understanding: The creation of the four-dimensional array is the size of the 2x3x4, so in the first dimension (2 dimension) in any one of the dimensions have 3x4 elements, in the second dimension (3 dimension) in any one dimension has a 2x4 element, in the third dimension (4 dimension) of any dimension has 2x3 elements.

Four. Matrix operations

eg

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.