R Fundamental 1

Source: Internet
Author: User

1.1 R Environment

It's doable to run on the systems like Windows, Linux and Unix. The most convience-manipulate R is through Graphies interface.

1.2 Interactively

All commands work through a prompt and default prompt are ' > ', which could be the same either on Linux or Windows shell p Rompt.

1.3 Getting Help

R has a build-in help facility. The command is

>help (object)

An alternative is

>?object

If a command is not finished on the end of a line, R would give a default symbol ' + ', and it would read the input from Secon D line or subsequent lines until command was done.

2.1 Numbers and Vectors

R operates on named data structures. The very simplest one is numeric vector. The keyword is ' c ' and assignment operator ' <-'. For-example, to-set-a vector named X, concludes total 3 numbers, namely 1, 2, 3, the command is

> x <-C (1, 2, 3)

Or in the oppsite direction

> C (1, 2, 3) x

Assignment can also is done using the By function ' assign () '.

> Assign ("X", C (1, 2, 3))

2.2 Arithmetic

Just use arithmetic expressions can fulfill the calculation needs. The elementary arithmetic operators is the usual ' +,-, *,/, ^ '. Additional operators includes ' min, max, length, sum, log, exp, sin, cos, tan, sqrt ... '. Symbol "I" for the complex numbers.

R Fundamental 1

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.