Let's learn the types of data | Introduction to Rstats (statistical analysis/scientific calculation)

Remember the data types available in Rstats. The type of Rstats is the same as the type of R language.

NULL - Nothing

Use NULL to indicate that there is nothing. It can be used to initialize an array or remove attributes such as the names attribute.

NULL

Missing value NA

Missing values are represented by NA . NA stands for data loss.

NA

Non - number - NaN, Inf (immovable decimal point operation only)

NaN, although named NA, is completely different. It means that it cannot be expressed as a number in the calculation of NaN immovable decimal point.

NaN

For example, the result of the operation "0/0" cannot be expressed as a number, so it becomes "NaN".

Also, if the floating point operation can be expressed as infinity, "Inf" is returned.

=====

Inf

For example, the result of the operation "1/0" is "Inf".

String

To create a string, specify the Perl string as an argument to the "c_" function.

c_ ("abc");

Numerical value

To create a number, specify the Perl number as an argument to the "c_" function.

c_ (34.4);

Complex numbers

Use i_ to represent complex numbers. For example, to express the complex number "1 + 2i", use the " i_ " function as follows.

1 + 2 * i_

Please note that the number "1" and the complex number "1 + 0 * i_" are different.

Logical value

The logical ground is expressed by " TRUE " and " FALSE ".

# True
TRUE

# Fake
FALSE

You can also use T_ and F_ as abbreviations.

# True
T_

# Fake
F_

Date (not implemented)

There is a date type, but it is not currently implemented.


Introduction to Rstats (statistical analysis/scientific calculation)

Related Informatrion