An introduction to R - cran.r [PDF]

While the commercial implementation of S, S-PLUS, is struggling to keep its existing users, the open source version of S

5 downloads 59 Views 2MB Size

Recommend Stories


An Introduction to R
We may have all come on different ships, but we're in the same boat now. M.L.King

An Introduction to R
Never let your sense of morals prevent you from doing what is right. Isaac Asimov

An Introduction to R
Ask yourself: What kind of person do you enjoy spending time with? Next

An Introduction to R
Nothing in nature is unbeautiful. Alfred, Lord Tennyson

An introduction to PDF
Those who bring sunshine to the lives of others cannot keep it from themselves. J. M. Barrie

An introduction to Maximum Likelihood in R
The wound is the place where the Light enters you. Rumi

PDF An Introduction to Banking
Ask yourself: What kind of person do you enjoy spending time with? Next

[PDF] Introduction to Stochastic Processes with R
We must be willing to let go of the life we have planned, so as to have the life that is waiting for

Introduction to R Graphics in R
What you seek is seeking you. Rumi

Idea Transcript


An introduction to R Longhow Lam Under Construction Feb-2010 some sections are unfinished!

longhowlam at gmail dot com

Contents 1 Introduction 1.1 What is R? . . . . . . . . . . . . . . . . . . . 1.2 The R environment . . . . . . . . . . . . . . . 1.3 Obtaining and installing R . . . . . . . . . . . 1.4 Your first R session . . . . . . . . . . . . . . . 1.5 The available help . . . . . . . . . . . . . . . . 1.5.1 The on line help . . . . . . . . . . . . . 1.5.2 The R mailing lists and the R Journal 1.6 The R workspace, managing objects . . . . . . 1.7 R Packages . . . . . . . . . . . . . . . . . . . 1.8 Conflicting objects . . . . . . . . . . . . . . . 1.9 Editors for R scripts . . . . . . . . . . . . . . 1.9.1 The editor in RGui . . . . . . . . . . . 1.9.2 Other editors . . . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

7 7 8 8 9 11 11 12 12 13 15 16 16 16

2 or the curve function. Different uses of the function plot . . . . . . . . . . . . . . . . . . . . . Example distribution plot in R . . . . . . . . . . . . . . . . . . . . . . . Example barplot where the first argument is a matrix . . . . . . . . . . . Example graphs of multi dimensional ) [1] "x" "x2"

If you assign a value to an object that already exists then the contents of the object will be overwritten with the new value (without a warning!). Use the function rm to remove one or more objects from your session. > rm(x, x2)

To conclude your first session, we create two small vectors with , header=TRUE) mydf Col1 Col2 Col3 Col4 1 23 45 A John 2 34 41 B Jimmy 3 12 99 B Patrick

By default R converts character , header=TRUE, stringsAsFactors=FALSE )

To specify that certain columns are character and other columns are not you must use the colClasses argument and provide the type for each column. mydf

Smile Life

When life gives you a hundred reasons to cry, show life that you have a thousand reasons to smile

Get in touch

© Copyright 2015 - 2024 PDFFOX.COM - All rights reserved.