Data frames - Creating a data frame

preview_player
Показать описание


The common limitation of vectors and matrices is that they can only store elements of a single basic type. If we try to assign objects of different kinds to either, R’s coercion takes place. That’s mighty inconvenient for storing any type of real data, which often include both numerical and string variables, as well as, although less often, logical values. Lists are very cumbersome as structures, which makes them extremely difficult to operate on directly.

Think of data frames as an Excel spreadsheet: they store different types of data, simultaneously, in a functional way.

Data frames combine vectors of the same length into the columns of a table. Data types can differ between columns, but not within columns. That said, a row can be constructed by cells with different data types, but columns can only contain cells of one type.

You can reassign names with the names() function, or do it directly in the initial call.

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.

#RProgramming #DataScience #Statistics
Рекомендации по теме