A Half-hour to Learn R

submited by
Style Pass
2021-06-21 23:00:06

This article, inspired by a similar tutorial about Rust(1), tries to go over the main features of R language in a time-span of 30 minutes. Currently it introduces most of R-specific concepts like vectorisation, recycling, subsetting, matrix and data.frame objects, as well as various built in types. Control statements, and function/object declarations are currently omitted.

Since the available symbols on the keyboard are not enough to cover all necessary operators, other, lesser used operators are defined by surrounding them with a percent symbol %:

Variable names must start with a dot or a letter and contain only letters, numbers, dots, and underscores. They cannot overwrite existing special values like NA and TRUE. Three assignment operators can be used to achieve the same thing:

In addition R allows to define “non syntactic” identifiers. Standard variable names must follow defined rules but backtick quotation forces any string to be evaluated as an identifier:

Leave a Comment