Загрузка страницы

Data Science & Statistics: Matrix recycling in R

👉🏻 Download Our Free Data Science Career Guide: https://bit.ly/3g8kIZt
👉🏻 FREE MONTH! Get full access to our newly redesigned platform and all our courses (18th October - 18th November): https://bit.ly/3kWG4wE

We know that in R vectors recycle. But do matrices? Yes, absolutely. This lesson explains how.
In the context of matrices, if you specify dimensions that can’t be filled up by your matrix, R will recycle the vector so your matrix is complete. For example, if I passed the vector from 1 to 10 in the matrix function, and made it explicit that I want my matrix to contain 4 rows and 4 columns, R will recognise that my vector is too short for the matrix, and it will repeat it until all 16 value spots hold a value. As you see, in this particular case, R also issues a warning that 10 is not a multiple of the number of rows, but that isn’t usually consequential. The moral of the story here is: be aware that recycling will happen, if necessary, in some matrix operations.

► Consider hitting the SUBSCRIBE button if you LIKE the content: https://www.youtube.com/c/365DataScience?sub_confirmation=1

► VISIT our website: https://bit.ly/365ds

🤝 Connect with us LinkedIn: https://www.linkedin.com/company/365datascience/

365 Data Science is an online educational career website that offers the incredible opportunity to find your way into the data science world no matter your previous knowledge and experience. We have prepared numerous courses that suit the needs of aspiring BI analysts, Data analysts and Data scientists.

We at 365 Data Science are committed educators who believe that curiosity should not be hindered by inability to access good learning resources. This is why we focus all our efforts on creating high-quality educational content which anyone can access online.

Check out our Data Science Career guides: https://www.youtube.com/playlist?list=PLaFfQroTgZnyQFq4nUfb-w2vEopN3ULMb

№DataScience #RProgramming #Statistics

Видео Data Science & Statistics: Matrix recycling in R канала 365 Data Science
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
27 апреля 2018 г. 17:27:43
00:01:46
Яндекс.Метрика