[PDF] Introduction to R - Department of Statistics - University of California



Previous PDF View Next PDF







if (condition) et ==, =, lt;, gt; (opérateurs logiques de - MySTI2D

[PDF] if (condition) et ==, =, lt , gt (opérateurs logiques de MySTID mystid polynesie SIN files Branchements pdf



Initiation à la programmation sous R - Christophe Genolini

[PDF] Initiation à la programmation sous R Christophe Genolinichristophe genolini free R%et%programmation pdf



Cration de fonctions dans le langage R - Université de Montréal

[PDF] Cration de fonctions dans le langage R Université de Montréalbiol biol umontreal ca Intro R DB BaseProgR pdf



R, Bonnes pratiques - cranr - R Project

[PDF] R, Bonnes pratiques cran r R Project cran r project doc Genolini RBonnesPratiques pdf



Introduction à la programmation en R - cranr - R Project

[PDF] Introduction à la programmation en R cran r R Project cran r project doc Goulet introduction programmation R pdf



R pour les débutants - cranr - R Project

[PDF] R pour les débutants cran r R Project cran r project doc contrib Paradis rdebuts pdf



Condition R - Michigan State University

[PDF] Condition R Michigan State University msu edu course lin pdf lidz Rule R pdf



Introduction to R - Department of Statistics - University of California

[PDF] Introduction to R Department of Statistics University of California stat berkeley edu ~spector Rcourse pdf



(n, r)-ARC IN PG(2, q) AND ITS APPLICATIONS Noboru - UPC

[PDF] (n, r) ARC IN PG(, q) AND ITS APPLICATIONS Noboru UPC mat web upc edu people HamadaMarutaOya pdf



SUFFICIENT CONDITIONS FOR THE CONVERGENCE OF _ r(y

torovic, conditions under which a sequence {vi} determined theorem has the virtue of imposing no conditions on the second varia r(y) = M, if \\y yo\\ á a,

[PDF] condition réussite cfc employé commerce

[PDF] conditional sentences exercises with answers pdf

[PDF] conditional type 0 1 2 3 lesson pdf

[PDF] conditional type 0 1 2 3 rules pdf

[PDF] conditional type 1 exercises pdf with answers

[PDF] conditional type 3 exercises pdf

[PDF] conditions avancement de grade fonction publique territoriale 2017

[PDF] conditions carte visa societe generale algerie

[PDF] conditions d'accès pfi

[PDF] conditions de ressources ampoules gratuites

[PDF] conditions générales d'abonnement orange mobile

[PDF] conditions générales de services

[PDF] conditions générales de vente orange business services

[PDF] conditions générales primes énergie 2017

[PDF] conditions pour postuler bourse uemoa

IntroductiontoR

PhilSpector

StatisticalComputingFacility

DepartmentofStatistics

UniversityofCalifornia,Berkeley

1

SomeBasics

logical. special<-operator. onscalarsandarrays arbitraryRobjects. allmustbethesamelength. 2

UsingR

usedtodisplaytheentireobject. arguments.Forexample,typeq()toquitR. appliedtoanysubscriptablevalue. 3

GettingDataintoR

vector. {Usethewhat=argumenttoreadcharacterdata. names. environment. 4

WhereRstoresyourdata

dierentproject. wanttosavethedata. youdon'twant. beingpromptedeachtimeyouexitR. wheneveryouwant 5

GettingHelp

startedifyoudon'tknowthenameofafunction. throughthedemo()function. 6

Libraries

R,itismostlikelyavailableinalibrary.

Finally,youcanloadalibrarywiththecommand

library(libraryname)

ArchiveNetwork)at

7

SearchPath

with()function.) 8

SizesofObjects

returnthenumberofcolumnsinthedataframe. 9

FindingObjects

createwillbestored. period,whichwouldotherwisebesuppressed. theexpression. 10 get()andassign() databaseandgettheobjectasfollows: >attach("rproject/.RData") >search() [10]"package:base" >get("x",2) non-defaultlocation. 11

CombiningObjects

isavector. >c(matrix(1:4,ncol=2),1:3) [1]1234123 elements: >list(matrix(1:4,ncol=2),1:3) [[1]] [,1][,2] [1,]13 [2,]24 [[2]] [1]123 12

CombiningObjects(cont'd)

[[1]] [,1][,2] [1,]13 [2,]24 [[2]] [1]123 [[3]] [1]12345 recursive=TRUEargumentofc(): [1]1234123 13

Subscripting

lists.Rsupportsseveraltypesofsubscripts: preservingitssizeandtype. x[]=1changeseachvalueofxto1. matrix[,j]. languages portions. 14

Subscripts(cont'd)

elements subscripts object$namecanalsobeused. data forwhichthesubscriptisTRUE. 15

ExamplesofSubscriptingOperations

x[,1]istherstcolumn. x[3,]isthethirdrow. threerows,andcolumns1and3ofx.

1,3and5.

whichtherstcolumnofxisgreaterthan2. thirdcolumnsofx 16

MoreonSubscripts

argumenttothesubscriptoperator: >mx[,3] [1]3558 >mx[,3,drop=FALSE] three [1,]3 [2,]5 [3,]5 [4,]8 17 [[SubscriptingOperator >mylist=list(1:10,10:20,30:40) >mean(mylist[1]) [1]NA

Warningmessage:

>mean(mylist[[1]]) [1]5.5 notation. 18

SubscriptingwithDataFrames

foreitherofthosetypes. doublebracketsoranemptyrstsubscript. x["name"]isadataframewithonecolumn. therstobservation. 19

TablesandMatrices

assigningvalues. >a [,1][,2] [1,]11 [2,]12 [3,]23 >x=matrix(0,nrow=4,ncol=3) >x[a]=c(10,20,30) >x [,1][,2][,3] [1,]10200 [2,]0030 [3,]000 [4,]000 20

TypeConversionFunctions

as.vector(). arguments. 21

SomeFunctionsforVectors

objects. uniquevalueinthevector rev()-reversetheorderofelementsinavector sort()-sortstheelementsinavector. sum()-sumoftheelementsofavector min()-minimumvalueinavector max()-maximumvalueinavector 22

MissingValues

>values=c(12,NA,19,15,12,17,14,NA,19) >values[!is.na(values)] [1]12191512171419 >vv=matrix(values,ncol=3,byrow=TRUE) >vv[!is.na(vv[,2]),,drop=FALSE] [,1][,2][,3] [1,]151217 23

ReadingR'sInputfromaFile

typedintotheRinterpreter. passedtosource. 24

AlternativeInput:Connections

UNIXpscommandlookslikethis:

PIDTTYTIMECMD

26377pts/100:00:00tcsh

26392pts/100:00:02R

26647pts/100:00:00ps

dataframe: >read.table(pipe("ps"),header=TRUE)

PIDTTYTIMECMD

126377pts/100:00:00tcsh

226392pts/100:00:02R

326647pts/100:00:00ps

25

Printing

>print(7) [1]7 >print(matrix(c(1,2,3,4),ncol=2)) [,1][,2] [1,]13quotesdbs_dbs3.pdfusesText_6