concept type in category R

appears as: The types, Types, type, types, The type, The type, type
Beyond Spreadsheets with R

This is an excerpt from Manning's book Beyond Spreadsheets with R.

Data isn’t always pretty (in fact, most times it’s dirty, mundane, and seemingly uninteresting), and it isn’t always in the format we want. Having some tools on hand to manage data is a powerful advantage and is critical to achieving a reliable goal, but that’s only useful if you know what your data represents before you do anything further with it. “Garbage in, garbage out” warns that you can’t perform an analysis on terrible data and expect to get a meaningful result. You may very well have tried to evaluate a calculation in Excel only to have the result show up as #VALUE! because you tried to divide a number by some text, even though that “text” looked like numbers. The types of your values (text, numbers, images, and so on) are themselves pieces of data with possible meanings behind them, and you’ll learn how to best make use of them.

R is what’s known as a weakly typed language, in that the type of data is guessed or assumed rather than declared (or enforced). This can be very useful in terms of getting started because you don’t need to worry about setting the data type whenever you’re using data. But you’ll also learn how to change the type later if you aren’t getting what you want by default.

make_a_list$y

#> Error: object of type 'closure' is not subsettable