- Machine Learning with R Quick Start Guide
- Iván Pastor Sanz
- 247字
- 2021-06-24 16:01:29
Objects, special cases, and basic operators in R
By now, you will have figured out that R is an object-oriented language. All our variables, data, and functions will be stored in the active memory of the computer as objects. These objects can be modified using different operators or functions. An object in R has two attributes, namely, mode and length.
Mode includes the basic type of elements and has four options:
- Numeric: These are decimal numbers
- Character: Represents sequences of string values
- Complex: Combination of real and imaginary numbers, for example, x+ai
- Logical: Either true (1) or false (0)
Length means the number of elements in an object.
In most cases, we need not care whether or not the elements of a numerical object are integers, reals, or even complexes. Calculations will be carried out internally as numbers of double precision, real, or complex, depending on the case. To work with complex numbers, we must indicate explicitly the complex part.
In case an element or value is unavailable, we assign NA, a special value. Usually, operations with NA elements result in NA unless we are using some functions that can treat missing values in some way or omit them. Sometimes, calculations can lead to answers with a positive or negative infinite value (represented by R as Inf or -Inf, respectively). On the other hand, certain calculations lead to expressions that are not numbers represented by R as NaN (short for not a number).
- Circos Data Visualization How-to
- TIBCO Spotfire:A Comprehensive Primer(Second Edition)
- Blockchain Quick Start Guide
- 流處理器研究與設計
- SharePoint 2010開發最佳實踐
- 統計挖掘與機器學習:大數據預測建模和分析技術(原書第3版)
- PLC與變頻技術應用
- Drupal高手建站技術手冊
- Red Hat Enterprise Linux 5.0服務器構建與故障排除
- 計算機應用基礎學習指導與練習(Windows XP+Office 2003)
- 數據庫基礎:Access
- NetSuite ERP for Administrators
- Arduino創意機器人入門:基于Mixly
- ACM程序設計(第2版)
- 面向Agent的軟件設計開發方法