• Aucun résultat trouvé

Version 4.2.0 Under development (unstable) (2022-01-27)

N/A
N/A
Protected

Academic year: 2022

Partager "Version 4.2.0 Under development (unstable) (2022-01-27)"

Copied!
3820
0
0

Texte intégral

(1)

R: A Language and Environment for Statistical Computing

Reference Index

The R Core Team

Version 4.2.0 Under development (unstable) (2022-01-27)

Copyright (©) 1999–2012 R Foundation for Statistical Computing.

Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.

Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.

Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the R Core Team.

R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under the terms of the GNU General Public License. For more information about these matters, see https://www.gnu.org/copyleft/gpl.html.

(2)

i

I 1

1 Thebasepackage 3

base-package . . . 3

.bincode . . . 3

.Device . . . 4

.Machine . . . 5

.Platform . . . 7

abbreviate . . . 9

agrep . . . 10

all . . . 12

all.equal . . . 14

all.names . . . 17

any . . . 18

aperm . . . 19

append . . . 20

apply . . . 21

args . . . 22

Arithmetic . . . 24

array . . . 26

as.data.frame . . . 28

as.Date . . . 30

as.environment . . . 33

as.function . . . 34

as.POSIX* . . . 35

AsIs . . . 38

asplit . . . 39

assign . . . 40

assignOps . . . 41

attach . . . 42

attr . . . 44

attributes . . . 46

autoload . . . 47

backsolve . . . 48

basename . . . 49

Bessel . . . 50

bindenv . . . 53

bitwise . . . 55

body . . . 56

bquote . . . 57

browser . . . 58

browserText . . . 60

builtins . . . 61

by . . . 62

c . . . 63

call . . . 64

callCC . . . 66

CallExternal . . . 67

capabilities . . . 68

cat . . . 70

cbind . . . 72

char.expand . . . 75

character . . . 76

(3)

ii

charmatch . . . 77

chartr . . . 78

chkDots . . . 80

chol . . . 81

chol2inv . . . 83

class . . . 84

col . . . 86

Colon . . . 87

colSums . . . 88

commandArgs . . . 90

comment . . . 90

Comparison . . . 91

complex . . . 93

conditions . . . 95

conflicts . . . 99

connections . . . 100

Constants . . . 110

contributors . . . 111

Control . . . 111

copyright . . . 113

crossprod . . . 113

Cstack_info . . . 114

cumsum . . . 115

curlGetHeaders . . . 116

cut . . . 117

cut.POSIXt . . . 119

data.class . . . 121

data.frame . . . 122

data.matrix . . . 124

date . . . 125

Dates . . . 126

DateTimeClasses . . . 127

dcf . . . 131

debug . . . 133

Defunct . . . 135

delayedAssign . . . 136

deparse . . . 137

deparseOpts . . . 139

Deprecated . . . 141

det . . . 142

detach . . . 143

diag . . . 145

diff . . . 146

difftime . . . 147

dim . . . 149

dimnames . . . 150

do.call . . . 152

dontCheck . . . 154

dots . . . 154

double . . . 155

dput . . . 157

drop . . . 159

(4)

iii

droplevels . . . 160

dump . . . 161

duplicated . . . 162

dyn.load . . . 165

eapply . . . 167

eigen . . . 168

encodeString . . . 170

Encoding . . . 171

environment . . . 173

EnvVar . . . 175

eval . . . 178

exists . . . 180

expand.grid . . . 182

expression . . . 183

Extract . . . 184

Extract.data.frame . . . 189

Extract.factor . . . 192

Extremes . . . 193

extSoftVersion . . . 196

factor . . . 197

file.access . . . 201

file.choose . . . 202

file.info . . . 202

file.path . . . 204

file.show . . . 205

files . . . 206

files2 . . . 209

find.package . . . 210

findInterval . . . 212

force . . . 213

forceAndCall . . . 214

Foreign . . . 215

formals . . . 217

format . . . 218

format.info . . . 221

format.pval . . . 222

formatC . . . 223

formatDL . . . 228

function . . . 229

funprog . . . 230

gc . . . 232

gc.time . . . 234

gctorture . . . 235

get . . . 236

getDLLRegisteredRoutines . . . 237

getLoadedDLLs . . . 239

getNativeSymbolInfo . . . 240

gettext . . . 242

getwd . . . 245

gl . . . 246

grep . . . 246

grepRaw . . . 252

(5)

iv

groupGeneric . . . 254

grouping . . . 256

gzcon . . . 257

hexmode . . . 258

Hyperbolic . . . 260

iconv . . . 261

icuSetCollate . . . 264

identical . . . 266

identity . . . 269

ifelse . . . 269

integer . . . 271

interaction . . . 272

interactive . . . 273

Internal . . . 274

InternalMethods . . . 274

invisible . . . 276

is.finite . . . 277

is.function . . . 279

is.language . . . 279

is.object . . . 280

is.R . . . 281

is.recursive . . . 281

is.single . . . 282

is.unsorted . . . 283

ISOdatetime . . . 284

isS4 . . . 284

isSymmetric . . . 286

jitter . . . 287

kappa . . . 288

kronecker . . . 290

l10n_info . . . 291

labels . . . 292

lapply . . . 293

Last.value . . . 296

La_library . . . 296

La_version . . . 297

length . . . 298

lengths . . . 299

levels . . . 300

libcurlVersion . . . 302

libPaths . . . 303

library . . . 305

library.dynam . . . 308

license . . . 310

list . . . 311

list.files . . . 313

list2DF . . . 314

list2env . . . 315

load . . . 316

locales . . . 318

log . . . 321

Logic . . . 322

(6)

v

logical . . . 324

LongVectors . . . 325

lower.tri . . . 326

ls . . . 327

make.names . . . 328

make.unique . . . 330

mapply . . . 331

marginSums . . . 332

mat.or.vec . . . 333

match . . . 333

match.arg . . . 335

match.call . . . 337

match.fun . . . 338

MathFun . . . 339

matmult . . . 340

matrix . . . 341

maxCol . . . 343

mean . . . 344

memCompress . . . 345

memlimits . . . 347

Memory . . . 347

Memory-limits . . . 348

memory.profile . . . 350

merge . . . 350

message . . . 353

missing . . . 354

mode . . . 355

mtfrm . . . 356

NA . . . 357

name . . . 359

names . . . 360

nargs . . . 362

nchar . . . 363

nlevels . . . 365

noquote . . . 366

norm . . . 367

normalizePath . . . 369

NotYet . . . 370

nrow . . . 371

ns-dblcolon . . . 372

ns-hooks . . . 373

ns-load . . . 374

ns-topenv . . . 377

NULL . . . 377

numeric . . . 379

NumericConstants . . . 380

numeric_version . . . 382

octmode . . . 383

on.exit . . . 385

Ops.Date . . . 386

options . . . 387

order . . . 397

(7)

vi

outer . . . 400

Paren . . . 401

parse . . . 402

paste . . . 405

path.expand . . . 407

pcre_config . . . 408

pipeOp . . . 408

plot . . . 410

pmatch . . . 411

polyroot . . . 413

pos.to.env . . . 414

pretty . . . 414

Primitive . . . 416

print . . . 417

print.data.frame . . . 419

print.default . . . 420

prmatrix . . . 422

proc.time . . . 423

prod . . . 424

proportions . . . 425

pushBack . . . 426

qr . . . 427

QR.Auxiliaries . . . 430

quit . . . 431

Quotes . . . 433

R.Version . . . 436

Random . . . 438

Random.user . . . 442

range . . . 444

rank . . . 445

rapply . . . 447

raw . . . 448

rawConnection . . . 449

rawConversion . . . 451

RdUtils . . . 453

readBin . . . 454

readChar . . . 457

readline . . . 458

readLines . . . 459

readRDS . . . 461

readRenviron . . . 463

Recall . . . 464

reg.finalizer . . . 465

regex . . . 466

regmatches . . . 470

remove . . . 472

rep . . . 473

replace . . . 476

Reserved . . . 476

rev . . . 477

Rhome . . . 477

rle . . . 478

(8)

vii

Round . . . 479

round.POSIXt . . . 481

row . . . 482

row+colnames . . . 483

row.names . . . 484

rowsum . . . 486

S3method . . . 487

sample . . . 488

save . . . 490

scale . . . 493

scan . . . 494

search . . . 498

seek . . . 499

seq . . . 500

seq.Date . . . 502

seq.POSIXt . . . 503

sequence . . . 505

serialize . . . 506

sets . . . 507

setTimeLimit . . . 508

showConnections . . . 509

shQuote . . . 511

sign . . . 512

Signals . . . 513

sink . . . 514

slice.index . . . 515

slotOp . . . 516

socketSelect . . . 517

solve . . . 518

sort . . . 519

source . . . 522

Special . . . 525

split . . . 528

sprintf . . . 530

sQuote . . . 534

srcfile . . . 536

StackOverflows . . . 539

standardGeneric . . . 539

startsWith . . . 540

Startup . . . 541

stop . . . 544

stopifnot . . . 546

strptime . . . 548

strrep . . . 554

strsplit . . . 555

strtoi . . . 557

strtrim . . . 558

structure . . . 558

strwrap . . . 559

subset . . . 560

substitute . . . 562

substr . . . 564

(9)

viii

sum . . . 565

summary . . . 567

svd . . . 568

sweep . . . 570

switch . . . 572

Syntax . . . 573

Sys.getenv . . . 575

Sys.getpid . . . 576

Sys.glob . . . 576

Sys.info . . . 578

Sys.localeconv . . . 579

sys.parent . . . 580

Sys.readlink . . . 583

Sys.setenv . . . 584

Sys.setFileTime . . . 585

Sys.sleep . . . 586

sys.source . . . 587

Sys.time . . . 588

Sys.which . . . 589

system . . . 590

system.file . . . 592

system.time . . . 593

system2 . . . 594

t . . . 596

table . . . 597

tabulate . . . 600

tapply . . . 601

taskCallback . . . 603

taskCallbackManager . . . 605

taskCallbackNames . . . 606

tempfile . . . 607

textConnection . . . 609

tilde . . . 611

timezones . . . 612

toString . . . 616

trace . . . 617

traceback . . . 621

tracemem . . . 623

transform . . . 624

Trig . . . 626

trimws . . . 627

try . . . 628

typeof . . . 630

unique . . . 631

unlink . . . 632

unlist . . . 633

unname . . . 635

UseMethod . . . 636

userhooks . . . 638

utf8Conversion . . . 640

UTF8filepaths . . . 642

validUTF8 . . . 643

(10)

ix

vector . . . 644

Vectorize . . . 646

warning . . . 647

warnings . . . 649

weekdays . . . 651

which . . . 652

which.min . . . 654

with . . . 655

withVisible . . . 657

write . . . 658

writeLines . . . 659

xtfrm . . . 660

zapsmall . . . 661

zpackages . . . 661

zutils . . . 662

2 Thecompilerpackage 663 compile . . . 663

3 Thedatasetspackage 667 datasets-package . . . 667

ability.cov . . . 667

airmiles . . . 668

AirPassengers . . . 669

airquality . . . 670

anscombe . . . 671

attenu . . . 672

attitude . . . 673

austres . . . 674

beavers . . . 674

BJsales . . . 676

BOD . . . 676

cars . . . 677

ChickWeight . . . 678

chickwts . . . 679

CO2 . . . 680

co2 . . . 681

crimtab . . . 682

discoveries . . . 684

DNase . . . 684

esoph . . . 685

euro . . . 687

eurodist . . . 688

EuStockMarkets . . . 688

faithful . . . 689

Formaldehyde . . . 690

freeny . . . 691

HairEyeColor . . . 692

Harman23.cor . . . 693

Harman74.cor . . . 693

Indometh . . . 694

infert . . . 695

InsectSprays . . . 696

(11)

x

iris . . . 697

islands . . . 698

JohnsonJohnson . . . 698

LakeHuron . . . 699

lh . . . 699

LifeCycleSavings . . . 700

Loblolly . . . 701

longley . . . 702

lynx . . . 703

morley . . . 703

mtcars . . . 704

nhtemp . . . 705

Nile . . . 706

nottem . . . 707

npk . . . 708

occupationalStatus . . . 709

Orange . . . 709

OrchardSprays . . . 710

PlantGrowth . . . 711

precip . . . 712

presidents . . . 713

pressure . . . 714

Puromycin . . . 714

quakes . . . 716

randu . . . 717

rivers . . . 718

rock . . . 718

sleep . . . 719

stackloss . . . 720

state . . . 721

sunspot.month . . . 722

sunspot.year . . . 723

sunspots . . . 724

swiss . . . 725

Theoph . . . 726

Titanic . . . 727

ToothGrowth . . . 728

treering . . . 729

trees . . . 730

UCBAdmissions . . . 731

UKDriverDeaths . . . 732

UKgas . . . 733

UKLungDeaths . . . 734

USAccDeaths . . . 734

USArrests . . . 735

USJudgeRatings . . . 736

USPersonalExpenditure . . . 737

uspop . . . 737

VADeaths . . . 738

volcano . . . 739

warpbreaks . . . 739

women . . . 740

(12)

xi

WorldPhones . . . 741

WWWusage . . . 742

4 ThegrDevicespackage 743 grDevices-package . . . 743

adjustcolor . . . 743

as.graphicsAnnot . . . 745

as.raster . . . 745

axisTicks . . . 747

boxplot.stats . . . 748

bringToTop . . . 750

cairo . . . 751

cairoSymbolFont . . . 753

check.options . . . 754

chull . . . 755

cm . . . 756

col2rgb . . . 756

colorRamp . . . 758

colors . . . 760

contourLines . . . 761

convertColor . . . 762

densCols . . . 764

dev . . . 765

dev.capabilities . . . 767

dev.capture . . . 768

dev.flush . . . 769

dev.interactive . . . 769

dev.size . . . 770

dev2 . . . 771

dev2bitmap . . . 773

devAskNewPage . . . 775

Devices . . . 775

embedFonts . . . 777

extendrange . . . 778

getGraphicsEvent . . . 779

gray . . . 782

gray.colors . . . 783

grSoftVersion . . . 784

hcl . . . 785

Hershey . . . 787

hsv . . . 790

Japanese . . . 791

make.rgb . . . 792

msgWindow . . . 794

n2mfrow . . . 794

nclass . . . 795

palette . . . 797

Palettes . . . 799

pdf . . . 803

pdf.options . . . 807

pictex . . . 808

plotmath . . . 810

png . . . 815

(13)

xii

postscript . . . 818

postscriptFonts . . . 825

pretty.Date . . . 827

ps.options . . . 828

quartz . . . 830

quartzFonts . . . 832

recordGraphics . . . 833

recordPlot . . . 834

rgb . . . 836

rgb2hsv . . . 837

savePlot . . . 839

trans3d . . . 840

Type1Font . . . 840

windows . . . 842

windows.options . . . 846

windowsFonts . . . 847

x11 . . . 848

X11Fonts . . . 853

xfig . . . 854

xy.coords . . . 856

xyTable . . . 857

xyz.coords . . . 858

5 Thegraphicspackage 861 graphics-package . . . 861

abline . . . 861

arrows . . . 863

assocplot . . . 864

Axis . . . 866

axis . . . 867

axis.POSIXct . . . 870

axTicks . . . 871

barplot . . . 873

box . . . 877

boxplot . . . 878

boxplot.matrix . . . 881

bxp . . . 882

cdplot . . . 885

clip . . . 887

contour . . . 888

convertXY . . . 890

coplot . . . 892

curve . . . 894

dotchart . . . 896

filled.contour . . . 898

fourfoldplot . . . 900

frame . . . 902

grid . . . 903

hist . . . 904

hist.POSIXt . . . 907

identify . . . 909

image . . . 911

layout . . . 914

(14)

xiii

legend . . . 916

lines . . . 921

locator . . . 922

matplot . . . 923

mosaicplot . . . 926

mtext . . . 929

pairs . . . 931

panel.smooth . . . 934

par . . . 934

persp . . . 943

pie . . . 947

plot.data.frame . . . 949

plot.default . . . 950

plot.design . . . 952

plot.factor . . . 954

plot.formula . . . 955

plot.histogram . . . 956

plot.raster . . . 958

plot.table . . . 959

plot.window . . . 960

plot.xy . . . 961

points . . . 962

polygon . . . 965

polypath . . . 967

rasterImage . . . 969

rect . . . 970

rug . . . 972

screen . . . 973

segments . . . 975

smoothScatter . . . 976

spineplot . . . 978

stars . . . 980

stem . . . 984

stripchart . . . 984

strwidth . . . 986

sunflowerplot . . . 988

symbols . . . 990

text . . . 992

title . . . 995

units . . . 996

xspline . . . 997

6 Thegridpackage 1001 grid-package . . . 1001

absolute.size . . . 1002

arrow . . . 1003

as.mask . . . 1003

calcStringMetric . . . 1004

dataViewport . . . 1006

depth . . . 1007

deviceLoc . . . 1008

drawDetails . . . 1009

editDetails . . . 1010

(15)

xiv

editViewport . . . 1011

explode . . . 1012

gEdit . . . 1012

getNames . . . 1013

gpar . . . 1014

gPath . . . 1016

Grid . . . 1017

Grid Viewports . . . 1017

grid.add . . . 1021

grid.bezier . . . 1022

grid.cap . . . 1023

grid.circle . . . 1024

grid.clip . . . 1025

grid.convert . . . 1027

grid.copy . . . 1029

grid.curve . . . 1029

grid.delay . . . 1031

grid.display.list . . . 1032

grid.DLapply . . . 1033

grid.draw . . . 1034

grid.edit . . . 1035

grid.force . . . 1036

grid.frame . . . 1038

grid.function . . . 1039

grid.get . . . 1041

grid.grab . . . 1042

grid.grep . . . 1044

grid.grill . . . 1045

grid.grob . . . 1046

grid.group . . . 1047

grid.layout . . . 1049

grid.lines . . . 1051

grid.locator . . . 1053

grid.ls . . . 1054

grid.move.to . . . 1056

grid.newpage . . . 1057

grid.null . . . 1058

grid.pack . . . 1059

grid.path . . . 1060

grid.place . . . 1063

grid.plot.and.legend . . . 1064

grid.points . . . 1065

grid.polygon . . . 1066

grid.pretty . . . 1067

grid.raster . . . 1068

grid.record . . . 1069

grid.rect . . . 1070

grid.refresh . . . 1072

grid.remove . . . 1072

grid.reorder . . . 1073

grid.segments . . . 1075

grid.set . . . 1076

(16)

xv

grid.show.layout . . . 1077

grid.show.viewport . . . 1078

grid.stroke . . . 1079

grid.text . . . 1081

grid.xaxis . . . 1083

grid.xspline . . . 1084

grid.yaxis . . . 1086

grobCoords . . . 1088

grobName . . . 1089

grobWidth . . . 1089

grobX . . . 1090

legendGrob . . . 1091

makeContent . . . 1092

patterns . . . 1093

plotViewport . . . 1095

Querying the Viewport Tree . . . 1095

resolveRasterSize . . . 1097

roundrect . . . 1098

showGrob . . . 1099

showViewport . . . 1100

stringWidth . . . 1101

unit . . . 1102

unit.c . . . 1104

unit.length . . . 1105

unit.pmin . . . 1105

unit.rep . . . 1106

unitType . . . 1107

valid.just . . . 1108

validDetails . . . 1109

viewportTransform . . . 1109

vpPath . . . 1111

widthDetails . . . 1112

Working with Viewports . . . 1113

xDetails . . . 1115

xsplinePoints . . . 1116

7 Themethodspackage 1119 methods-package . . . 1119

.BasicFunsList . . . 1120

as . . . 1120

BasicClasses . . . 1122

callGeneric . . . 1123

callNextMethod . . . 1125

canCoerce . . . 1129

cbind2 . . . 1129

Classes . . . 1131

classesToAM . . . 1131

Classes_Details . . . 1133

className . . . 1136

classRepresentation-class . . . 1138

Documentation . . . 1139

dotsMethods . . . 1140

environment-class . . . 1143

(17)

xvi

envRefClass-class . . . 1144

evalSource . . . 1145

findClass . . . 1148

findMethods . . . 1149

fixPre1.8 . . . 1152

genericFunction-class . . . 1153

GenericFunctions . . . 1154

getClass . . . 1157

getMethod . . . 1159

getPackageName . . . 1162

hasArg . . . 1163

implicitGeneric . . . 1164

inheritedSlotNames . . . 1166

initialize-methods . . . 1167

Introduction . . . 1168

is . . . 1170

isSealedMethod . . . 1172

language-class . . . 1173

LinearMethodsList-class . . . 1174

LocalReferenceClasses . . . 1175

makeClassRepresentation . . . 1176

method.skeleton . . . 1177

MethodDefinition-class . . . 1178

Methods . . . 1179

MethodsList-class . . . 1179

Methods_Details . . . 1180

Methods_for_Nongenerics . . . 1184

Methods_for_S3 . . . 1189

MethodWithNext-class . . . 1191

new . . . 1192

nonStructure-class . . . 1194

ObjectsWithPackage-class . . . 1194

promptClass . . . 1195

promptMethods . . . 1196

ReferenceClasses . . . 1197

removeMethod . . . 1208

representation . . . 1209

S3Part . . . 1210

S4groupGeneric . . . 1213

SClassExtension-class . . . 1215

selectSuperClasses . . . 1216

setAs . . . 1217

setClass . . . 1220

setClassUnion . . . 1225

setGeneric . . . 1226

setGroupGeneric . . . 1230

setIs . . . 1231

setLoadActions . . . 1235

setMethod . . . 1238

setOldClass . . . 1242

show . . . 1245

showMethods . . . 1247

(18)

xvii

signature-class . . . 1249

slot . . . 1250

StructureClasses . . . 1252

testInheritedMethods . . . 1254

TraceClasses . . . 1255

validObject . . . 1256

8 Theparallelpackage 1259 parallel-package . . . 1259

clusterApply . . . 1260

detectCores . . . 1263

makeCluster . . . 1264

mcaffinity . . . 1266

mcchildren . . . 1267

mcfork . . . 1269

mclapply . . . 1271

mcparallel . . . 1274

pvec . . . 1277

RNGstreams . . . 1279

splitIndices . . . 1280

9 Thesplinespackage 1283 splines-package . . . 1283

asVector . . . 1283

backSpline . . . 1284

bs . . . 1285

interpSpline . . . 1286

ns . . . 1287

periodicSpline . . . 1289

polySpline . . . 1290

predict.bs . . . 1291

predict.bSpline . . . 1292

splineDesign . . . 1293

splineKnots . . . 1294

splineOrder . . . 1295

xyVector . . . 1296

10 Thestatspackage 1297 stats-package . . . 1297

.checkMFClasses . . . 1297

acf . . . 1298

acf2AR . . . 1301

add1 . . . 1301

addmargins . . . 1304

aggregate . . . 1305

AIC . . . 1308

alias . . . 1310

anova . . . 1311

anova.glm . . . 1312

anova.lm . . . 1313

anova.mlm . . . 1315

ansari.test . . . 1317

aov . . . 1319

(19)

xviii

approxfun . . . 1321

ar . . . 1324

ar.ols . . . 1327

arima . . . 1329

arima.sim . . . 1333

arima0 . . . 1334

ARMAacf . . . 1338

ARMAtoMA . . . 1339

as.hclust . . . 1340

asOneSidedFormula . . . 1341

ave . . . 1341

bandwidth . . . 1342

bartlett.test . . . 1344

Beta . . . 1345

binom.test . . . 1348

Binomial . . . 1350

biplot . . . 1352

biplot.princomp . . . 1353

birthday . . . 1354

Box.test . . . 1355

C . . . 1357

cancor . . . 1358

case+variable.names . . . 1359

Cauchy . . . 1360

chisq.test . . . 1361

Chisquare . . . 1364

cmdscale . . . 1367

coef . . . 1369

complete.cases . . . 1370

confint . . . 1371

constrOptim . . . 1372

contrast . . . 1374

contrasts . . . 1375

convolve . . . 1376

cophenetic . . . 1378

cor . . . 1379

cor.test . . . 1382

cov.wt . . . 1385

cpgram . . . 1386

cutree . . . 1387

decompose . . . 1388

delete.response . . . 1390

dendrapply . . . 1391

dendrogram . . . 1392

density . . . 1397

deriv . . . 1401

deviance . . . 1403

df.residual . . . 1404

diffinv . . . 1405

dist . . . 1406

Distributions . . . 1409

dummy.coef . . . 1410

(20)

xix

ecdf . . . 1411

eff.aovlist . . . 1413

effects . . . 1415

embed . . . 1416

expand.model.frame . . . 1417

Exponential . . . 1418

extractAIC . . . 1419

factanal . . . 1421

factor.scope . . . 1424

family . . . 1425

FDist . . . 1429

fft . . . 1431

filter . . . 1432

fisher.test . . . 1434

fitted . . . 1437

fivenum . . . 1438

fligner.test . . . 1438

formula . . . 1440

formula.nls . . . 1442

friedman.test . . . 1443

ftable . . . 1445

ftable.formula . . . 1447

GammaDist . . . 1448

Geometric . . . 1450

getInitial . . . 1452

glm . . . 1453

glm.control . . . 1458

glm.summaries . . . 1459

hclust . . . 1460

heatmap . . . 1463

HoltWinters . . . 1466

Hypergeometric . . . 1469

identify.hclust . . . 1471

influence.measures . . . 1472

integrate . . . 1476

interaction.plot . . . 1478

IQR . . . 1480

is.empty.model . . . 1481

isoreg . . . 1481

KalmanLike . . . 1483

kernapply . . . 1485

kernel . . . 1486

kmeans . . . 1488

kruskal.test . . . 1490

ks.test . . . 1492

ksmooth . . . 1494

lag . . . 1495

lag.plot . . . 1496

line . . . 1498

listof . . . 1499

lm . . . 1499

lm.fit . . . 1503

(21)

xx

lm.influence . . . 1505

lm.summaries . . . 1506

loadings . . . 1508

loess . . . 1509

loess.control . . . 1511

Logistic . . . 1512

logLik . . . 1513

loglin . . . 1515

Lognormal . . . 1517

lowess . . . 1518

ls.diag . . . 1519

ls.print . . . 1521

lsfit . . . 1521

mad . . . 1523

mahalanobis . . . 1524

make.link . . . 1525

makepredictcall . . . 1526

manova . . . 1527

mantelhaen.test . . . 1528

mauchly.test . . . 1530

mcnemar.test . . . 1532

median . . . 1533

medpolish . . . 1534

model.extract . . . 1535

model.frame . . . 1536

model.matrix . . . 1539

model.tables . . . 1540

monthplot . . . 1542

mood.test . . . 1544

Multinom . . . 1545

na.action . . . 1546

na.contiguous . . . 1547

na.fail . . . 1548

naprint . . . 1549

naresid . . . 1549

NegBinomial . . . 1550

nextn . . . 1552

nlm . . . 1553

nlminb . . . 1556

nls . . . 1558

nls.control . . . 1564

NLSstAsymptotic . . . 1565

NLSstClosestX . . . 1566

NLSstLfAsymptote . . . 1567

NLSstRtAsymptote . . . 1568

nobs . . . 1568

Normal . . . 1569

numericDeriv . . . 1571

offset . . . 1572

oneway.test . . . 1573

optim . . . 1574

optimize . . . 1579

(22)

xxi order.dendrogram . . . 1581 p.adjust . . . 1582 Pair . . . 1584 pairwise.prop.test . . . 1585 pairwise.t.test . . . 1586 pairwise.table . . . 1587 pairwise.wilcox.test . . . 1587 plot.acf . . . 1588 plot.density . . . 1590 plot.HoltWinters . . . 1590 plot.isoreg . . . 1591 plot.lm . . . 1593 plot.ppr . . . 1596 plot.profile.nls . . . 1597 plot.spec . . . 1599 plot.stepfun . . . 1600 plot.ts . . . 1602 Poisson . . . 1603 poisson.test . . . 1605 poly . . . 1606 power . . . 1608 power.anova.test . . . 1609 power.prop.test . . . 1610 power.t.test . . . 1612 PP.test . . . 1613 ppoints . . . 1614 ppr . . . 1615 prcomp . . . 1619 predict . . . 1621 predict.Arima . . . 1622 predict.glm . . . 1624 predict.HoltWinters . . . 1625 predict.lm . . . 1627 predict.loess . . . 1629 predict.nls . . . 1631 predict.smooth.spline . . . 1632 preplot . . . 1633 princomp . . . 1634 print.power.htest . . . 1636 print.ts . . . 1637 printCoefmat . . . 1638 profile . . . 1640 profile.nls . . . 1640 proj . . . 1641 prop.test . . . 1643 prop.trend.test . . . 1645 qqnorm . . . 1646 quade.test . . . 1648 quantile . . . 1650 r2dtable . . . 1652 read.ftable . . . 1653 rect.hclust . . . 1656

(23)

xxii

relevel . . . 1657 reorder.default . . . 1657 reorder.dendrogram . . . 1659 replications . . . 1660 reshape . . . 1661 residuals . . . 1665 runmed . . . 1666 rWishart . . . 1668 scatter.smooth . . . 1670 screeplot . . . 1671 sd . . . 1672 se.contrast . . . 1672 selfStart . . . 1674 setNames . . . 1676 shapiro.test . . . 1677 sigma . . . 1678 SignRank . . . 1680 simulate . . . 1681 smooth . . . 1683 smooth.spline . . . 1685 smoothEnds . . . 1690 sortedXyData . . . 1691 spec.ar . . . 1692 spec.pgram . . . 1693 spec.taper . . . 1695 spectrum . . . 1696 splinefun . . . 1698 SSasymp . . . 1701 SSasympOff . . . 1703 SSasympOrig . . . 1704 SSbiexp . . . 1706 SSD . . . 1707 SSfol . . . 1708 SSfpl . . . 1710 SSgompertz . . . 1711 SSlogis . . . 1712 SSmicmen . . . 1714 SSweibull . . . 1715 start . . . 1716 stat.anova . . . 1717 stats-deprecated . . . 1718 step . . . 1718 stepfun . . . 1720 stl . . . 1722 stlmethods . . . 1725 StructTS . . . 1726 summary.aov . . . 1728 summary.glm . . . 1729 summary.lm . . . 1731 summary.manova . . . 1733 summary.nls . . . 1735 summary.princomp . . . 1736

(24)

xxiii supsmu . . . 1737 symnum . . . 1738 t.test . . . 1740 TDist . . . 1742 termplot . . . 1745 terms . . . 1747 terms.formula . . . 1748 terms.object . . . 1749 time . . . 1750 toeplitz . . . 1751 ts . . . 1752 ts-methods . . . 1754 ts.plot . . . 1754 ts.union . . . 1755 tsdiag . . . 1756 tsp . . . 1757 tsSmooth . . . 1758 Tukey . . . 1758 TukeyHSD . . . 1760 Uniform . . . 1761 uniroot . . . 1763 update . . . 1766 update.formula . . . 1767 var.test . . . 1768 varimax . . . 1769 vcov . . . 1770 Weibull . . . 1771 weighted.mean . . . 1773 weighted.residuals . . . 1774 weights . . . 1775 wilcox.test . . . 1775 Wilcoxon . . . 1779 window . . . 1781 xtabs . . . 1782

11 Thestats4package 1787

stats4-package . . . 1787 coef-methods . . . 1787 confint-methods . . . 1788 logLik-methods . . . 1788 mle . . . 1788 mle-class . . . 1792 plot-methods . . . 1793 profile-methods . . . 1793 profile.mle-class . . . 1794 show-methods . . . 1795 summary-methods . . . 1795 summary.mle-class . . . 1796 update-methods . . . 1796 vcov-methods . . . 1797

12 Thetcltkpackage 1799

tcltk-package . . . 1799

(25)

xxiv

TclInterface . . . 1799 tclServiceMode . . . 1804 TkCommands . . . 1804 tkpager . . . 1808 tkProgressBar . . . 1809 tkStartGUI . . . 1810 TkWidgetcmds . . . 1810 TkWidgets . . . 1813 tk_choose.dir . . . 1815 tk_choose.files . . . 1816 tk_messageBox . . . 1817 tk_select.list . . . 1817

13 Thetoolspackage 1819

tools-package . . . 1819 .print.via.format . . . 1819 add_datalist . . . 1820 assertCondition . . . 1821 bibstyle . . . 1822 buildVignette . . . 1824 buildVignettes . . . 1825 charsets . . . 1827 checkFF . . . 1827 checkMD5sums . . . 1829 checkPoFiles . . . 1829 checkRd . . . 1831 checkRdaFiles . . . 1833 checkTnF . . . 1834 checkVignettes . . . 1835 check_packages_in_dir . . . 1836 codoc . . . 1838 compactPDF . . . 1840 CRANtools . . . 1841 delimMatch . . . 1843 dependsOnPkgs . . . 1844 encoded_text_to_latex . . . 1845 fileutils . . . 1847 find_gs_cmd . . . 1848 getVignetteInfo . . . 1849 HTMLheader . . . 1850 HTMLlinks . . . 1851 loadRdMacros . . . 1851 makevars . . . 1853 make_translations_pkg . . . 1853 md5sum . . . 1854 package_dependencies . . . 1855 package_native_routine_registration_skeleton . . . 1856 parseLatex . . . 1859 parse_Rd . . . 1860 pskill . . . 1861 psnice . . . 1863 QC . . . 1864 Rcmd . . . 1865

(26)

xxv Rd2HTML . . . 1866 Rd2txt_options . . . 1868 Rdiff . . . 1870 Rdindex . . . 1871 RdTextFilter . . . 1871 Rdutils . . . 1873 read.00Index . . . 1874 showNonASCII . . . 1874 startDynamicHelp . . . 1875 SweaveTeXFilter . . . 1876 testInstalledPackage . . . 1877 texi2dvi . . . 1878 toHTML . . . 1879 tools-deprecated . . . 1880 toRd . . . 1881 toTitleCase . . . 1882 undoc . . . 1882 update_PACKAGES . . . 1883 update_pkg_po . . . 1885 userdir . . . 1887 vignetteEngine . . . 1887 vignetteInfo . . . 1889 write_PACKAGES . . . 1890 xgettext . . . 1892

14 Theutilspackage 1895

utils-package . . . 1895 adist . . . 1895 alarm . . . 1897 apropos . . . 1898 aregexec . . . 1899 arrangeWindows . . . 1900 askYesNo . . . 1902 aspell . . . 1903 aspell-utils . . . 1905 available.packages . . . 1906 BATCH . . . 1909 bibentry . . . 1910 browseEnv . . . 1914 browseURL . . . 1915 browseVignettes . . . 1917 bug.report . . . 1918 capture.output . . . 1920 changedFiles . . . 1921 charClass . . . 1923 choose.dir . . . 1925 choose.files . . . 1926 chooseBioCmirror . . . 1927 chooseCRANmirror . . . 1928 citation . . . 1929 cite . . . 1930 citEntry . . . 1933 clipboard . . . 1934

(27)

xxvi

close.socket . . . 1935 combn . . . 1936 compareVersion . . . 1937 COMPILE . . . 1938 contrib.url . . . 1939 count.fields . . . 1939 create.post . . . 1940 data . . . 1942 dataentry . . . 1944 debugcall . . . 1946 debugger . . . 1947 demo . . . 1949 DLL.version . . . 1951 download.file . . . 1951 download.packages . . . 1955 edit . . . 1956 edit.data.frame . . . 1958 example . . . 1959 file.edit . . . 1961 file_test . . . 1962 findLineNum . . . 1963 fix . . . 1965 flush.console . . . 1966 format . . . 1966 getAnywhere . . . 1967 getFromNamespace . . . 1968 getParseData . . . 1970 getS3method . . . 1972 getWindowsHandle . . . 1973 getWindowsHandles . . . 1974 glob2rx . . . 1975 globalVariables . . . 1976 hashtab . . . 1978 hasName . . . 1980 head . . . 1981 help . . . 1984 help.request . . . 1987 help.search . . . 1988 help.start . . . 1990 hsearch-utils . . . 1991 INSTALL . . . 1993 install.packages . . . 1995 installed.packages . . . 2000 isS3method . . . 2002 isS3stdGeneric . . . 2003 LINK . . . 2003 localeToCharset . . . 2004 ls.str . . . 2005 maintainer . . . 2007 make.packages.html . . . 2008 make.socket . . . 2009 menu . . . 2010

(28)

xxvii methods . . . 2011 mirrorAdmin . . . 2013 modifyList . . . 2014 news . . . 2014 nsl . . . 2017 object.size . . . 2017 package.skeleton . . . 2020 packageDescription . . . 2022 packageName . . . 2024 packageStatus . . . 2024 page . . . 2026 person . . . 2027 PkgUtils . . . 2030 process.events . . . 2031 prompt . . . 2032 promptData . . . 2034 promptPackage . . . 2035 Question . . . 2036 rcompgen . . . 2038 read.DIF . . . 2043 read.fortran . . . 2045 read.fwf . . . 2046 read.socket . . . 2048 read.table . . . 2049 readRegistry . . . 2054 recover . . . 2055 relist . . . 2056 REMOVE . . . 2058 remove.packages . . . 2059 removeSource . . . 2060 RHOME . . . 2061 roman . . . 2061 Rprof . . . 2063 Rprofmem . . . 2065 Rscript . . . 2067 RShowDoc . . . 2068 RSiteSearch . . . 2069 rtags . . . 2070 Rtangle . . . 2072 RweaveLatex . . . 2074 Rwin configuration . . . 2078 savehistory . . . 2079 select.list . . . 2081 sessionInfo . . . 2082 setRepositories . . . 2084 setWindowTitle . . . 2085 SHLIB . . . 2086 shortPathName . . . 2087 sourceutils . . . 2088 stack . . . 2089 str . . . 2091 strcapture . . . 2094

(29)

xxviii

summaryRprof . . . 2095 Sweave . . . 2097 SweaveSyntConv . . . 2099 tar . . . 2100 toLatex . . . 2103 txtProgressBar . . . 2104 type.convert . . . 2105 untar . . . 2107 unzip . . . 2110 update.packages . . . 2111 url.show . . . 2113 URLencode . . . 2114 utils-deprecated . . . 2115 View . . . 2115 vignette . . . 2116 warnErrList . . . 2118 winDialog . . . 2119 winextras . . . 2120 winMenus . . . 2120 winProgressBar . . . 2122 write.table . . . 2123 zip . . . 2126

II 2129

15 TheKernSmoothpackage 2131

bkde . . . 2131 bkde2D . . . 2132 bkfe . . . 2134 dpih . . . 2135 dpik . . . 2136 dpill . . . 2137 locpoly . . . 2139

16 TheMASSpackage 2141

abbey . . . 2141 accdeaths . . . 2141 addterm . . . 2142 Aids2 . . . 2143 Animals . . . 2144 anorexia . . . 2145 anova.negbin . . . 2145 area . . . 2146 bacteria . . . 2147 bandwidth.nrd . . . 2148 bcv . . . 2149 beav1 . . . 2150 beav2 . . . 2151 Belgian-phones . . . 2152 biopsy . . . 2153 birthwt . . . 2154 Boston . . . 2155

(30)

xxix boxcox . . . 2156 cabbages . . . 2157 caith . . . 2158 Cars93 . . . 2158 cats . . . 2160 cement . . . 2160 chem . . . 2161 con2tr . . . 2161 confint-MASS . . . 2162 contr.sdif . . . 2163 coop . . . 2164 corresp . . . 2165 cov.rob . . . 2166 cov.trob . . . 2168 cpus . . . 2169 crabs . . . 2170 Cushings . . . 2171 DDT . . . 2171 deaths . . . 2172 denumerate . . . 2172 dose.p . . . 2173 drivers . . . 2174 dropterm . . . 2174 eagles . . . 2176 epil . . . 2177 eqscplot . . . 2178 farms . . . 2179 fgl . . . 2180 fitdistr . . . 2181 forbes . . . 2182 fractions . . . 2183 GAGurine . . . 2184 galaxies . . . 2185 gamma.dispersion . . . 2185 gamma.shape . . . 2186 gehan . . . 2187 genotype . . . 2188 geyser . . . 2189 gilgais . . . 2190 ginv . . . 2191 glm.convert . . . 2191 glm.nb . . . 2192 glmmPQL . . . 2193 hills . . . 2194 hist.scott . . . 2195 housing . . . 2196 huber . . . 2197 hubers . . . 2198 immer . . . 2199 Insurance . . . 2200 isoMDS . . . 2201 kde2d . . . 2202

(31)

xxx

lda . . . 2203 ldahist . . . 2205 leuk . . . 2207 lm.gls . . . 2208 lm.ridge . . . 2209 loglm . . . 2210 logtrans . . . 2212 lqs . . . 2213 mammals . . . 2216 mca . . . 2217 mcycle . . . 2218 Melanoma . . . 2218 menarche . . . 2219 michelson . . . 2220 minn38 . . . 2220 motors . . . 2221 muscle . . . 2222 mvrnorm . . . 2223 negative.binomial . . . 2224 newcomb . . . 2225 nlschools . . . 2225 npk . . . 2226 npr1 . . . 2227 Null . . . 2228 oats . . . 2229 OME . . . 2230 painters . . . 2232 pairs.lda . . . 2233 parcoord . . . 2234 petrol . . . 2235 Pima.tr . . . 2236 plot.lda . . . 2237 plot.mca . . . 2238 plot.profile . . . 2238 polr . . . 2239 predict.glmmPQL . . . 2242 predict.lda . . . 2243 predict.lqs . . . 2244 predict.mca . . . 2245 predict.qda . . . 2246 profile.glm . . . 2247 qda . . . 2248 quine . . . 2250 Rabbit . . . 2251 rational . . . 2252 renumerate . . . 2253 rlm . . . 2253 rms.curv . . . 2256 rnegbin . . . 2257 road . . . 2258 rotifer . . . 2258 Rubber . . . 2259

(32)

xxxi sammon . . . 2260 ships . . . 2261 shoes . . . 2262 shrimp . . . 2262 shuttle . . . 2263 Sitka . . . 2263 Sitka89 . . . 2264 Skye . . . 2265 snails . . . 2266 SP500 . . . 2267 stdres . . . 2267 steam . . . 2268 stepAIC . . . 2268 stormer . . . 2270 studres . . . 2271 summary.loglm . . . 2272 summary.negbin . . . 2273 summary.rlm . . . 2274 survey . . . 2275 synth.tr . . . 2276 theta.md . . . 2276 topo . . . 2278 Traffic . . . 2278 truehist . . . 2279 ucv . . . 2280 UScereal . . . 2281 UScrime . . . 2282 VA . . . 2283 waders . . . 2283 whiteside . . . 2285 width.SJ . . . 2286 write.matrix . . . 2287 wtloss . . . 2288

17 TheMatrixpackage 2289

abIndex-class . . . 2289 abIseq . . . 2290 all-methods . . . 2291 all.equal-methods . . . 2292 atomicVector-class . . . 2292 band . . . 2293 bandSparse . . . 2294 bdiag . . . 2296 BunchKaufman-methods . . . 2297 CAex . . . 2299 cBind . . . 2300 CHMfactor-class . . . 2301 chol . . . 2304 chol2inv-methods . . . 2306 Cholesky . . . 2306 Cholesky-class . . . 2309 colSums . . . 2310 compMatrix-class . . . 2312

(33)

xxxii

condest . . . 2313 CsparseMatrix-class . . . 2315 ddenseMatrix-class . . . 2316 ddiMatrix-class . . . 2317 denseMatrix-class . . . 2318 dgCMatrix-class . . . 2319 dgeMatrix-class . . . 2320 dgRMatrix-class . . . 2321 dgTMatrix-class . . . 2322 Diagonal . . . 2323 diagonalMatrix-class . . . 2325 diagU2N . . . 2326 dMatrix-class . . . 2327 dpoMatrix-class . . . 2329 drop0 . . . 2330 dsCMatrix-class . . . 2331 dsparseMatrix-class . . . 2333 dsRMatrix-class . . . 2334 dsyMatrix-class . . . 2335 dtCMatrix-class . . . 2336 dtpMatrix-class . . . 2338 dtRMatrix-class . . . 2340 dtrMatrix-class . . . 2341 expand . . . 2342 expm . . . 2343 externalFormats . . . 2344 facmul . . . 2345 forceSymmetric . . . 2346 formatSparseM . . . 2347 generalMatrix-class . . . 2349 graph-sparseMatrix . . . 2349 Hilbert . . . 2351 image-methods . . . 2351 index-class . . . 2353 indMatrix-class . . . 2354 invPerm . . . 2356 is.na-methods . . . 2357 is.null.DN . . . 2358 isSymmetric-methods . . . 2359 isTriangular . . . 2360 KhatriRao . . . 2361 KNex . . . 2362 kronecker-methods . . . 2363 ldenseMatrix-class . . . 2364 ldiMatrix-class . . . 2365 lgeMatrix-class . . . 2365 lsparseMatrix-classes . . . 2366 lsyMatrix-class . . . 2368 ltrMatrix-class . . . 2369 lu . . . 2370 LU-class . . . 2372 mat2triplet . . . 2373

(34)

xxxiii Matrix . . . 2374 Matrix-class . . . 2376 matrix-products . . . 2378 MatrixClass . . . 2380 MatrixFactorization-class . . . 2381 ndenseMatrix-class . . . 2382 nearPD . . . 2383 ngeMatrix-class . . . 2386 nMatrix-class . . . 2387 nnzero . . . 2388 norm . . . 2389 nsparseMatrix-classes . . . 2390 nsyMatrix-class . . . 2392 ntrMatrix-class . . . 2393 number-class . . . 2394 pMatrix-class . . . 2394 printSpMatrix . . . 2396 qr-methods . . . 2399 rankMatrix . . . 2401 rcond . . . 2403 rep2abI . . . 2405 replValue-class . . . 2406 rleDiff-class . . . 2407 rsparsematrix . . . 2407 RsparseMatrix-class . . . 2409 Schur . . . 2410 Schur-class . . . 2411 solve-methods . . . 2412 sparse.model.matrix . . . 2415 sparseLU-class . . . 2417 SparseM-conversions . . . 2418 sparseMatrix . . . 2419 sparseMatrix-class . . . 2422 sparseQR-class . . . 2424 sparseVector . . . 2426 sparseVector-class . . . 2427 spMatrix . . . 2430 symmetricMatrix-class . . . 2431 symmpart . . . 2433 triangularMatrix-class . . . 2434 TsparseMatrix-class . . . 2435 uniqTsparse . . . 2436 unpack . . . 2437 Unused-classes . . . 2439 updown . . . 2439 USCounties . . . 2440 wrld_1deg . . . 2441 [-methods . . . 2442 [<–methods . . . 2443

%&%-methods . . . 2444

18 Thebootpackage 2447

abc.ci . . . 2447

(35)

xxxiv

acme . . . 2449 aids . . . 2449 aircondit . . . 2450 amis . . . 2451 aml . . . 2452 beaver . . . 2453 bigcity . . . 2454 boot . . . 2454 boot.array . . . 2460 boot.ci . . . 2461 brambles . . . 2464 breslow . . . 2465 calcium . . . 2466 cane . . . 2467 capability . . . 2468 catsM . . . 2468 cav . . . 2469 cd4 . . . 2470 cd4.nested . . . 2470 censboot . . . 2471 channing . . . 2475 claridge . . . 2476 cloth . . . 2477 co.transfer . . . 2477 coal . . . 2478 control . . . 2479 corr . . . 2481 cum3 . . . 2481 cv.glm . . . 2482 darwin . . . 2484 dogs . . . 2485 downs.bc . . . 2485 ducks . . . 2486 EEF.profile . . . 2487 empinf . . . 2488 envelope . . . 2490 exp.tilt . . . 2492 fir . . . 2494 freq.array . . . 2494 frets . . . 2495 glm.diag . . . 2496 glm.diag.plots . . . 2497 gravity . . . 2498 hirose . . . 2499 Imp.Estimates . . . 2500 imp.weights . . . 2502 inv.logit . . . 2503 islay . . . 2504 jack.after.boot . . . 2504 k3.linear . . . 2506 linear.approx . . . 2507 lines.saddle.distn . . . 2509

(36)

xxxv logit . . . 2511 manaus . . . 2511 melanoma . . . 2512 motor . . . 2513 neuro . . . 2514 nitrofen . . . 2514 nodal . . . 2515 norm.ci . . . 2516 nuclear . . . 2518 paulsen . . . 2519 plot.boot . . . 2519 poisons . . . 2522 polar . . . 2522 print.boot . . . 2523 print.bootci . . . 2524 print.saddle.distn . . . 2525 print.simplex . . . 2525 remission . . . 2526 saddle . . . 2527 saddle.distn . . . 2529 saddle.distn.object . . . 2532 salinity . . . 2533 simplex . . . 2533 simplex.object . . . 2535 smooth.f . . . 2536 sunspot . . . 2538 survival . . . 2538 tau . . . 2539 tilt.boot . . . 2540 tsboot . . . 2543 tuna . . . 2546 urine . . . 2547 var.linear . . . 2548 wool . . . 2548

19 Theclasspackage 2551

batchSOM . . . 2551 condense . . . 2552 knn . . . 2553 knn.cv . . . 2554 knn1 . . . 2555 lvq1 . . . 2556 lvq2 . . . 2557 lvq3 . . . 2558 lvqinit . . . 2559 lvqtest . . . 2560 multiedit . . . 2561 olvq1 . . . 2562 reduce.nn . . . 2563 SOM . . . 2564 somgrid . . . 2565

(37)

xxxvi

20 Theclusterpackage 2567

agnes . . . 2567 agnes.object . . . 2571 agriculture . . . 2572 animals . . . 2573 bannerplot . . . 2574 chorSub . . . 2576 clara . . . 2577 clara.object . . . 2580 clusGap . . . 2581 clusplot . . . 2585 clusplot.default . . . 2586 coef.hclust . . . 2590 daisy . . . 2591 diana . . . 2594 dissimilarity.object . . . 2596 ellipsoidhull . . . 2597 fanny . . . 2599 fanny.object . . . 2601 flower . . . 2603 lower.to.upper.tri.inds . . . 2604 mona . . . 2604 mona.object . . . 2606 pam . . . 2607 pam.object . . . 2610 partition.object . . . 2612 plantTraits . . . 2613 plot.agnes . . . 2614 plot.diana . . . 2616 plot.mona . . . 2618 plot.partition . . . 2619 pltree . . . 2621 pluton . . . 2622 predict.ellipsoid . . . 2623 print.agnes . . . 2624 print.clara . . . 2625 print.diana . . . 2625 print.dissimilarity . . . 2626 print.fanny . . . 2627 print.mona . . . 2627 print.pam . . . 2628 ruspini . . . 2628 silhouette . . . 2629 sizeDiss . . . 2632 summary.agnes . . . 2633 summary.clara . . . 2633 summary.diana . . . 2634 summary.mona . . . 2635 summary.pam . . . 2635 twins.object . . . 2636 volume.ellipsoid . . . 2636 votes.repub . . . 2637

(38)

xxxvii xclara . . . 2638

21 Thecodetoolspackage 2641

checkUsage . . . 2641 codetools . . . 2642 findGlobals . . . 2644 showTree . . . 2644

22 Theforeignpackage 2647

lookup.xport . . . 2647 read.arff . . . 2648 read.dbf . . . 2648 read.dta . . . 2650 read.epiinfo . . . 2651 read.mtp . . . 2652 read.octave . . . 2653 read.spss . . . 2654 read.ssd . . . 2657 read.systat . . . 2659 read.xport . . . 2660 S3 read functions . . . 2661 write.arff . . . 2662 write.dbf . . . 2663 write.dta . . . 2664 write.foreign . . . 2666

23 Thelatticepackage 2669

A_01_Lattice . . . 2669 B_00_xyplot . . . 2672 B_01_xyplot.ts . . . 2689 B_02_barchart.table . . . 2692 B_03_histogram . . . 2694 B_04_qqmath . . . 2698 B_05_qq . . . 2701 B_06_levelplot . . . 2703 B_07_cloud . . . 2708 B_08_splom . . . 2713 B_09_tmd . . . 2717 B_10_rfs . . . 2718 B_11_oneway . . . 2719 C_01_trellis.device . . . 2720 C_02_trellis.par.get . . . 2722 C_03_simpleTheme . . . 2725 C_04_lattice.options . . . 2727 C_05_print.trellis . . . 2728 C_06_update.trellis . . . 2732 C_07_shingles . . . 2734 D_draw.colorkey . . . 2736 D_draw.key . . . 2737 D_level.colors . . . 2737 D_make.groups . . . 2739 D_simpleKey . . . 2740 D_strip.default . . . 2741

(39)

xxxviii

D_trellis.object . . . 2743 E_interaction . . . 2744 F_1_panel.barchart . . . 2750 F_1_panel.bwplot . . . 2752 F_1_panel.cloud . . . 2754 F_1_panel.densityplot . . . 2758 F_1_panel.dotplot . . . 2759 F_1_panel.histogram . . . 2760 F_1_panel.levelplot . . . 2761 F_1_panel.pairs . . . 2763 F_1_panel.parallel . . . 2766 F_1_panel.qqmath . . . 2767 F_1_panel.stripplot . . . 2769 F_1_panel.xyplot . . . 2770 F_2_llines . . . 2772 F_2_panel.functions . . . 2775 F_2_panel.loess . . . 2778 F_2_panel.qqmathline . . . 2779 F_2_panel.smoothScatter . . . 2780 F_2_panel.spline . . . 2782 F_2_panel.superpose . . . 2783 F_2_panel.violin . . . 2785 F_3_prepanel.default . . . 2786 F_3_prepanel.functions . . . 2788 G_axis.default . . . 2789 G_banking . . . 2792 G_latticeParseFormula . . . 2794 G_packet.panel.default . . . 2795 G_panel.axis . . . 2796 G_panel.number . . . 2798 G_Rows . . . 2799 G_utilities.3d . . . 2800 H_barley . . . 2801 H_environmental . . . 2802 H_ethanol . . . 2803 H_melanoma . . . 2804 H_singer . . . 2805 H_USMortality . . . 2806 I_lset . . . 2808

24 Themgcvpackage 2809

anova.gam . . . 2809 bam . . . 2811 bam.update . . . 2817 bandchol . . . 2819 betar . . . 2820 blas.thread.test . . . 2821 bug.reports.mgcv . . . 2822 choldrop . . . 2822 choose.k . . . 2824 columb . . . 2826 concurvity . . . 2827 cox.ph . . . 2829

(40)

xxxix cox.pht . . . 2833 cSplineDes . . . 2835 dDeta . . . 2836 exclude.too.far . . . 2837 extract.lme.cov . . . 2838 family.mgcv . . . 2840 FFdes . . . 2841 fix.family.link . . . 2842 fixDependence . . . 2843 formula.gam . . . 2844 formXtViX . . . 2846 fs.test . . . 2847 full.score . . . 2848 gam . . . 2849 gam.check . . . 2858 gam.control . . . 2860 gam.convergence . . . 2863 gam.fit . . . 2864 gam.fit3 . . . 2865 gam.fit5.post.proc . . . 2868 gam.mh . . . 2869 gam.models . . . 2871 gam.outer . . . 2877 gam.reparam . . . 2879 gam.scale . . . 2880 gam.selection . . . 2880 gam.side . . . 2883 gam.vcomp . . . 2885 gam2objective . . . 2887 gamlss.etamu . . . 2888 gamlss.gH . . . 2889 gamm . . . 2890 gammals . . . 2896 gamObject . . . 2898 gamSim . . . 2901 gaulss . . . 2902 get.var . . . 2903 gevlss . . . 2904 ginla . . . 2906 gumbls . . . 2909 identifiability . . . 2910 in.out . . . 2911 influence.gam . . . 2912 initial.sp . . . 2913 inSide . . . 2914 interpret.gam . . . 2915 jagam . . . 2916 k.check . . . 2921 ldetS . . . 2922 ldTweedie . . . 2923 linear.functional.terms . . . 2925 logLik.gam . . . 2928

(41)

xl

ls.size . . . 2930 magic . . . 2931 magic.post.proc . . . 2935 mgcv.FAQ . . . 2936 mgcv.package . . . 2938 mgcv.parallel . . . 2940 mini.roots . . . 2942 missing.data . . . 2943 model.matrix.gam . . . 2944 mono.con . . . 2945 mroot . . . 2946 multinom . . . 2947 mvn . . . 2949 negbin . . . 2950 new.name . . . 2952 notExp . . . 2953 notExp2 . . . 2954 null.space.dimension . . . 2956 ocat . . . 2957 one.se.rule . . . 2958 pcls . . . 2959 pdIdnot . . . 2963 pdTens . . . 2964 pen.edf . . . 2965 place.knots . . . 2966 plot.gam . . . 2967 polys.plot . . . 2972 predict.bam . . . 2973 predict.gam . . . 2976 Predict.matrix . . . 2981 Predict.matrix.cr.smooth . . . 2983 Predict.matrix.soap.film . . . 2984 print.gam . . . 2986 psum.chisq . . . 2987 qq.gam . . . 2989 random.effects . . . 2991 residuals.gam . . . 2993 rig . . . 2994 rmvn . . . 2995 Rrank . . . 2996 rTweedie . . . 2997 s . . . 2998 scat . . . 3001 sdiag . . . 3002 shash . . . 3003 single.index . . . 3005 Sl.inirep . . . 3007 Sl.repara . . . 3008 Sl.setup . . . 3008 slanczos . . . 3009 smooth.construct . . . 3010 smooth.construct.ad.smooth.spec . . . 3015

(42)

xli smooth.construct.bs.smooth.spec . . . 3018 smooth.construct.cr.smooth.spec . . . 3021 smooth.construct.ds.smooth.spec . . . 3023 smooth.construct.fs.smooth.spec . . . 3025 smooth.construct.gp.smooth.spec . . . 3027 smooth.construct.mrf.smooth.spec . . . 3030 smooth.construct.ps.smooth.spec . . . 3033 smooth.construct.re.smooth.spec . . . 3035 smooth.construct.so.smooth.spec . . . 3038 smooth.construct.sos.smooth.spec . . . 3043 smooth.construct.t2.smooth.spec . . . 3046 smooth.construct.tensor.smooth.spec . . . 3047 smooth.construct.tp.smooth.spec . . . 3048 smooth.info . . . 3051 smooth.terms . . . 3052 smooth2random . . . 3055 smoothCon . . . 3057 sp.vcov . . . 3060 spasm.construct . . . 3061 step.gam . . . 3062 summary.gam . . . 3063 t2 . . . 3067 te . . . 3071 tensor.prod.model.matrix . . . 3075 totalPenaltySpace . . . 3077 trichol . . . 3078 trind.generator . . . 3079 Tweedie . . . 3080 twlss . . . 3082 uniquecombs . . . 3083 vcov.gam . . . 3085 vis.gam . . . 3086 XWXd . . . 3088 ziP . . . 3091 ziplss . . . 3093

25 Thenlmepackage 3097

ACF . . . 3097 ACF.gls . . . 3098 ACF.lme . . . 3099 Alfalfa . . . 3100 allCoef . . . 3101 anova.gls . . . 3102 anova.lme . . . 3104 as.matrix.corStruct . . . 3106 as.matrix.pdMat . . . 3107 as.matrix.reStruct . . . 3108 asOneFormula . . . 3109 Assay . . . 3110 asTable . . . 3110 augPred . . . 3111 balancedGrouped . . . 3113 bdf . . . 3114

(43)

xlii

BodyWeight . . . 3115 Cefamandole . . . 3116 Coef . . . 3116 coef.corStruct . . . 3117 coef.gnls . . . 3118 coef.lme . . . 3119 coef.lmList . . . 3120 coef.modelStruct . . . 3122 coef.pdMat . . . 3123 coef.reStruct . . . 3124 coef.varFunc . . . 3125 collapse . . . 3126 collapse.groupedData . . . 3127 compareFits . . . 3128 comparePred . . . 3129 corAR1 . . . 3130 corARMA . . . 3132 corCAR1 . . . 3134 corClasses . . . 3135 corCompSymm . . . 3136 corExp . . . 3137 corFactor . . . 3139 corFactor.corStruct . . . 3140 corGaus . . . 3141 corLin . . . 3142 corMatrix . . . 3144 corMatrix.corStruct . . . 3145 corMatrix.pdMat . . . 3146 corMatrix.reStruct . . . 3147 corNatural . . . 3148 corRatio . . . 3149 corSpatial . . . 3150 corSpher . . . 3152 corSymm . . . 3154 Covariate . . . 3155 Covariate.varFunc . . . 3156 Dialyzer . . . 3157 Dim . . . 3157 Dim.corSpatial . . . 3158 Dim.corStruct . . . 3159 Dim.pdMat . . . 3160 Earthquake . . . 3161 ergoStool . . . 3162 Fatigue . . . 3162 fdHess . . . 3163 fitted.glsStruct . . . 3164 fitted.gnlsStruct . . . 3165 fitted.lme . . . 3165 fitted.lmeStruct . . . 3166 fitted.lmList . . . 3167 fitted.nlmeStruct . . . 3168 fixed.effects . . . 3169

(44)

xliii fixef.lmList . . . 3170 formula.pdBlocked . . . 3171 formula.pdMat . . . 3172 formula.reStruct . . . 3173 gapply . . . 3173 Gasoline . . . 3175 getCovariate . . . 3175 getCovariate.corStruct . . . 3176 getCovariate.data.frame . . . 3177 getCovariate.varFunc . . . 3178 getCovariateFormula . . . 3179 getData . . . 3179 getData.gls . . . 3180 getData.lme . . . 3181 getData.lmList . . . 3182 getGroups . . . 3182 getGroups.corStruct . . . 3183 getGroups.data.frame . . . 3184 getGroups.gls . . . 3185 getGroups.lme . . . 3186 getGroups.lmList . . . 3187 getGroups.varFunc . . . 3188 getGroupsFormula . . . 3189 getResponse . . . 3190 getResponseFormula . . . 3191 getVarCov . . . 3191 gls . . . 3192 glsControl . . . 3194 glsObject . . . 3196 glsStruct . . . 3197 Glucose . . . 3197 Glucose2 . . . 3198 gnls . . . 3198 gnlsControl . . . 3200 gnlsObject . . . 3202 gnlsStruct . . . 3203 groupedData . . . 3204 gsummary . . . 3206 Gun . . . 3208 IGF . . . 3208 Initialize . . . 3209 Initialize.corStruct . . . 3210 Initialize.glsStruct . . . 3211 Initialize.lmeStruct . . . 3211 Initialize.reStruct . . . 3212 Initialize.varFunc . . . 3213 intervals . . . 3214 intervals.gls . . . 3215 intervals.lme . . . 3216 intervals.lmList . . . 3217 isBalanced . . . 3218 isInitialized . . . 3219

(45)

xliv

LDEsysMat . . . 3220 lme . . . 3221 lme.groupedData . . . 3223 lme.lmList . . . 3226 lmeControl . . . 3228 lmeObject . . . 3229 lmeStruct . . . 3231 lmList . . . 3232 lmList.groupedData . . . 3233 logDet . . . 3234 logDet.corStruct . . . 3235 logDet.pdMat . . . 3236 logDet.reStruct . . . 3236 logLik.corStruct . . . 3237 logLik.glsStruct . . . 3238 logLik.gnls . . . 3239 logLik.gnlsStruct . . . 3239 logLik.lme . . . 3240 logLik.lmeStruct . . . 3241 logLik.lmList . . . 3242 logLik.reStruct . . . 3243 logLik.varFunc . . . 3244 Machines . . . 3245 MathAchieve . . . 3245 MathAchSchool . . . 3246 Matrix . . . 3246 Matrix.pdMat . . . 3247 Matrix.reStruct . . . 3248 Meat . . . 3248 Milk . . . 3249 model.matrix.reStruct . . . 3250 Muscle . . . 3251 Names . . . 3251 Names.formula . . . 3252 Names.pdBlocked . . . 3253 Names.pdMat . . . 3254 Names.reStruct . . . 3255 needUpdate . . . 3256 needUpdate.modelStruct . . . 3256 Nitrendipene . . . 3257 nlme . . . 3258 nlme.nlsList . . . 3261 nlmeControl . . . 3263 nlmeObject . . . 3265 nlmeStruct . . . 3266 nlsList . . . 3267 nlsList.selfStart . . . 3269 Oats . . . 3270 Orthodont . . . 3270 Ovary . . . 3271 Oxboys . . . 3272 Oxide . . . 3272

(46)

xlv pairs.compareFits . . . 3273 pairs.lme . . . 3274 pairs.lmList . . . 3275 PBG . . . 3277 pdBlocked . . . 3277 pdClasses . . . 3279 pdCompSymm . . . 3280 pdConstruct . . . 3281 pdConstruct.pdBlocked . . . 3282 pdDiag . . . 3283 pdFactor . . . 3284 pdFactor.reStruct . . . 3285 pdIdent . . . 3286 pdLogChol . . . 3287 pdMat . . . 3289 pdMatrix . . . 3290 pdMatrix.reStruct . . . 3291 pdNatural . . . 3292 pdSymm . . . 3293 Phenobarb . . . 3294 phenoModel . . . 3295 Pixel . . . 3296 plot.ACF . . . 3297 plot.augPred . . . 3298 plot.compareFits . . . 3299 plot.gls . . . 3300 plot.intervals.lmList . . . 3301 plot.lme . . . 3302 plot.lmList . . . 3304 plot.nffGroupedData . . . 3305 plot.nfnGroupedData . . . 3307 plot.nmGroupedData . . . 3308 plot.ranef.lme . . . 3310 plot.ranef.lmList . . . 3312 plot.Variogram . . . 3313 pooledSD . . . 3314 predict.gls . . . 3315 predict.gnls . . . 3316 predict.lme . . . 3317 predict.lmList . . . 3318 predict.nlme . . . 3319 print.summary.pdMat . . . 3321 print.varFunc . . . 3322 qqnorm.gls . . . 3322 qqnorm.lme . . . 3324 Quinidine . . . 3325 quinModel . . . 3326 Rail . . . 3327 random.effects . . . 3328 ranef.lme . . . 3328 ranef.lmList . . . 3330 RatPupWeight . . . 3331

(47)

xlvi

recalc . . . 3332 recalc.corStruct . . . 3333 recalc.modelStruct . . . 3334 recalc.reStruct . . . 3335 recalc.varFunc . . . 3335 Relaxin . . . 3336 Remifentanil . . . 3337 residuals.gls . . . 3338 residuals.glsStruct . . . 3339 residuals.gnlsStruct . . . 3340 residuals.lme . . . 3341 residuals.lmeStruct . . . 3342 residuals.lmList . . . 3343 residuals.nlmeStruct . . . 3344 reStruct . . . 3345 simulate.lme . . . 3346 solve.pdMat . . . 3348 solve.reStruct . . . 3348 Soybean . . . 3349 splitFormula . . . 3350 Spruce . . . 3351 summary.corStruct . . . 3351 summary.gls . . . 3352 summary.lme . . . 3353 summary.lmList . . . 3354 summary.modelStruct . . . 3356 summary.nlsList . . . 3356 summary.pdMat . . . 3358 summary.varFunc . . . 3359 Tetracycline1 . . . 3360 Tetracycline2 . . . 3360 update.modelStruct . . . 3361 update.varFunc . . . 3361 varClasses . . . 3362 varComb . . . 3363 varConstPower . . . 3364 varConstProp . . . 3365 VarCorr . . . 3368 varExp . . . 3369 varFixed . . . 3370 varFunc . . . 3371 varIdent . . . 3371 Variogram . . . 3373 Variogram.corExp . . . 3374 Variogram.corGaus . . . 3375 Variogram.corLin . . . 3376 Variogram.corRatio . . . 3377 Variogram.corSpatial . . . 3378 Variogram.corSpher . . . 3379 Variogram.default . . . 3380 Variogram.gls . . . 3381 Variogram.lme . . . 3383

(48)

xlvii varPower . . . 3385 varWeights . . . 3386 varWeights.glsStruct . . . 3387 varWeights.lmeStruct . . . 3387 Wafer . . . 3388 Wheat . . . 3389 Wheat2 . . . 3389 [.pdMat . . . 3390

26 Thennetpackage 3391

class.ind . . . 3391 multinom . . . 3392 nnet . . . 3393 nnetHess . . . 3396 predict.nnet . . . 3397 which.is.max . . . 3398

27 Therpartpackage 3399

car.test.frame . . . 3399 car90 . . . 3400 cu.summary . . . 3402 kyphosis . . . 3403 labels.rpart . . . 3403 meanvar.rpart . . . 3404 na.rpart . . . 3405 path.rpart . . . 3406 plot.rpart . . . 3407 plotcp . . . 3408 post.rpart . . . 3409 predict.rpart . . . 3410 print.rpart . . . 3412 printcp . . . 3413 prune.rpart . . . 3414 residuals.rpart . . . 3415 rpart . . . 3416 rpart.control . . . 3417 rpart.exp . . . 3419 rpart.object . . . 3419 rsq.rpart . . . 3421 snip.rpart . . . 3422 solder.balance . . . 3423 stagec . . . 3424 summary.rpart . . . 3424 text.rpart . . . 3425 xpred.rpart . . . 3427

28 Thespatialpackage 3429

anova.trls . . . 3429 correlogram . . . 3430 expcov . . . 3431 Kaver . . . 3432 Kenvl . . . 3433 Kfn . . . 3434

(49)

xlviii

ppgetregion . . . 3435 ppinit . . . 3435 pplik . . . 3436 ppregion . . . 3437 predict.trls . . . 3437 prmat . . . 3438 Psim . . . 3439 semat . . . 3440 SSI . . . 3441 Strauss . . . 3442 surf.gls . . . 3443 surf.ls . . . 3444 trls.influence . . . 3445 trmat . . . 3446 variogram . . . 3447

29 Thesurvivalpackage 3449

aareg . . . 3449 aeqSurv . . . 3452 aggregate.survfit . . . 3453 agreg.fit . . . 3454 aml . . . 3455 anova.coxph . . . 3455 attrassign . . . 3456 basehaz . . . 3458 bladder . . . 3458 blogit . . . 3460 cch . . . 3461 cgd . . . 3463 cgd0 . . . 3464 cipoisson . . . 3465 clogit . . . 3466 cluster . . . 3468 colon . . . 3469 concordance . . . 3470 concordancefit . . . 3472 cox.zph . . . 3473 coxph . . . 3475 coxph.control . . . 3479 coxph.detail . . . 3481 coxph.object . . . 3482 coxph.wtest . . . 3483 coxsurv.fit . . . 3484 diabetic . . . 3485 dsurvreg . . . 3486 finegray . . . 3487 flchain . . . 3489 frailty . . . 3491 gbsg . . . 3493 heart . . . 3494 is.ratetable . . . 3495 kidney . . . 3495 levels.Surv . . . 3496

(50)

xlix lines.survfit . . . 3497 logan . . . 3499 logLik.coxph . . . 3500 lung . . . 3501 mgus . . . 3502 mgus2 . . . 3503 model.frame.coxph . . . 3504 model.matrix.coxph . . . 3505 myeloid . . . 3506 myeloma . . . 3507 nafld . . . 3507 neardate . . . 3509 nsk . . . 3510 nwtco . . . 3512 ovarian . . . 3513 pbc . . . 3514 pbcseq . . . 3515 plot.aareg . . . 3517 plot.cox.zph . . . 3517 plot.survfit . . . 3519 predict.coxph . . . 3522 predict.survreg . . . 3524 print.aareg . . . 3525 print.summary.coxph . . . 3526 print.summary.survexp . . . 3527 print.summary.survfit . . . 3527 print.survfit . . . 3528 pseudo . . . 3529 pspline . . . 3531 pyears . . . 3532 quantile.survfit . . . 3535 ratetable . . . 3536 ratetableDate . . . 3537 ratetables . . . 3538 rats . . . 3539 rats2 . . . 3540 reliability . . . 3540 residuals.coxph . . . 3542 residuals.survfit . . . 3543 residuals.survreg . . . 3544 retinopathy . . . 3546 rhDNase . . . 3547 ridge . . . 3548 rotterdam . . . 3549 royston . . . 3551 rttright . . . 3552 solder . . . 3553 stanford2 . . . 3554 statefig . . . 3554 strata . . . 3556 summary.aareg . . . 3557 summary.coxph . . . 3559

(51)

l

summary.pyears . . . 3560 summary.survexp . . . 3561 summary.survfit . . . 3562 Surv . . . 3564 Surv-methods . . . 3566 Surv2 . . . 3568 Surv2data . . . 3569 survcheck . . . 3570 survdiff . . . 3571 survexp . . . 3573 survexp.fit . . . 3576 survexp.object . . . 3577 survfit . . . 3578 survfit.coxph . . . 3579 survfit.formula . . . 3581 survfit.matrix . . . 3585 survfit.object . . . 3587 survfit0 . . . 3589 survfitcoxph.fit . . . 3590 survival-deprecated . . . 3591 survobrien . . . 3592 survreg . . . 3593 survreg.control . . . 3595 survreg.distributions . . . 3596 survreg.object . . . 3597 survregDtest . . . 3598 survSplit . . . 3599 tcut . . . 3601 tmerge . . . 3602 tobin . . . 3604 transplant . . . 3605 udca . . . 3606 untangle.specials . . . 3607 uspop2 . . . 3608 vcov.coxph . . . 3609 veteran . . . 3609 xtfrm.Surv . . . 3610 yates . . . 3611 yates_setup . . . 3612

Index 3615

(52)

Part I

1

(53)
(54)

Chapter 1

The base package

base-package The R Base Package

Description

Base R functions Details

This package contains the basic functions which letR function as a language: arithmetic, in- put/output, basic programming support, etc. Its contents are available through inheritance from any environment.

For a complete list of functions, uselibrary(help = "base").

.bincode Bin a Numeric Vector

Description

Bin a numeric vector and return integer codes for the binning.

Usage

.bincode(x, breaks, right = TRUE, include.lowest = FALSE)

Arguments

x a numeric vector which is to be converted to integer codes by binning.

breaks a numeric vector of two or more cut points, sorted in increasing order.

right logical, indicating if the intervals should be closed on the right (and open on the left) or vice versa.

include.lowest logical, indicating if an ‘x[i]’ equal to the lowest (or highest, forright = FALSE)

‘breaks’ value should be included in the first (or last) bin.

3

(55)

4 .Device Details

This is a ‘barebones’ version ofcut.default(labels = FALSE)intended for use in other functions which have checked the arguments passed. (Note the different order of the arguments they have in common.)

Unlikecut, thebreaksdo not need to be unique. An input can only fall into a zero-length interval if it is closed at both ends, so only ifinclude.lowest = TRUEand it is the first (or last forright = FALSE) interval.

Value

An integer vector of the same length asxindicating which bin each element falls into (the leftmost bin being bin1).NaNandNAelements ofxare mapped toNAcodes, as are values outside range of breaks.

See Also

cut,tabulate

Examples

## An example with non-unique breaks:

x <- c(0, 0.01, 0.5, 0.99, 1) b <- c(0, 0, 1, 1)

.bincode(x, b, TRUE) .bincode(x, b, FALSE) .bincode(x, b, TRUE, TRUE) .bincode(x, b, FALSE, TRUE)

.Device Lists of Open/Active Graphics Devices

Description

A pairlist of the names of open graphics devices is stored in.Devices. The name of the active device (seedev.cur) is stored in.Device. Both are symbols and so appear in the base namespace.

Value

.Deviceis a length-one character vector.

.Devicesis apairlistof length-one character vectors. The first entry is always"null device", and there are as many entries as the maximal number of graphics devices which have been simul- taneously active. If a device has been removed, its entry will be""until the device number is reused.

Devices may add attributes to the character vector: for example devices which write to a file may record its path in attribute"filepath".

(56)

.Machine 5

.Machine Numerical Characteristics of the Machine

Description

.Machineis a variable holding information on the numerical characteristics of the machineRis running on, such as the largest double or integer and the machine’s precision.

Usage .Machine

Details

The algorithm is based on Cody’s (1988) subroutine MACHAR. As all current implementations of Ruse 32-bit integers and use IEC 60559 floating-point (double precision) arithmetic, the"integer"

and"double"related values are the same for almost allRbuilds.

Note that on most platforms smaller positive values than.Machine$double.xmincan occur. On a typicalRplatform the smallest positive double is about5e-324.

Value

A list with components

double.eps the smallest positive floating-point number x such that 1 + x != 1. It equals double.base ^ ulp.digitsif eitherdouble.base is 2 ordouble.rounding is 0; otherwise, it is (double.base ^ double.ulp.digits) / 2. Normally 2.220446e-16.

double.neg.eps a small positive floating-point number x such that 1 - x != 1. It equals double.base ^ double.neg.ulp.digits if double.base is 2 or double.rounding is 0; otherwise, it is (double.base

^ double.neg.ulp.digits) / 2. Normally 1.110223e-16. As double.neg.ulp.digits is bounded below by -(double.digits + 3), double.neg.epsmay not be the smallest number that can alter 1 by subtrac- tion.

double.xmin the smallest non-zero normalized floating-point number, a power of the radix, i.e.,double.base ^ double.min.exp. Normally2.225074e-308.

double.xmax the largest normalized floating-point number. Typically, it is equal to (1 - double.neg.eps) * double.base ^ double.max.exp, but on some machines it is only the second or third largest such number, being too small by 1 or 2 units in the last digit of the significand. Normally1.797693e+308. Note that larger unnormalized numbers can occur.

double.base the radix for the floating-point representation: normally2.

double.digits the number of base digits in the floating-point significand: normally53.

double.rounding

the rounding action, one of 0 if floating-point addition chops;

1 if floating-point addition rounds, but not in the IEEE style;

2 if floating-point addition rounds in the IEEE style;

(57)

6 .Machine 3 if floating-point addition chops, and there is partial underflow;

4 if floating-point addition rounds, but not in the IEEE style, and there is partial underflow;

5 if floating-point addition rounds in the IEEE style, and there is partial under- flow.

Normally5.

double.guard the number of guard digits for multiplication with truncating arithmetic. It is 1 if floating-point arithmetic truncates and more thandouble digits base- double.basedigits participate in the post-normalization shift of the floating- point significand in multiplication, and 0 otherwise.

Normally0. double.ulp.digits

the largest negative integerisuch that1 + double.base ^ i != 1, except that it is bounded below by-(double.digits + 3). Normally-52.

double.neg.ulp.digits

the largest negative integerisuch that1 - double.base ^ i != 1, except that it is bounded below by-(double.digits + 3). Normally-53.

double.exponent

the number of bits (decimal places ifdouble.baseis 10) reserved for the repre- sentation of the exponent (including the bias or sign) of a floating-point number.

Normally11.

double.min.exp the largest in magnitude negative integerisuch thatdouble.base ^ iis positive and normalized. Normally-1022.

double.max.exp the smallest positive power ofdouble.basethat overflows. Normally1024. integer.max the largest integer which can be represented. Always231−1 = 2147483647.

sizeof.long the number of bytes in a Clong type: 4 or 8 (most 64-bit systems, but not Windows).

sizeof.longlong

the number of bytes in a Clong longtype. Will be zero if there is no such type, otherwise usually8.

sizeof.longdouble

the number of bytes in a Clong doubletype. Will be zero if there is no such type (or its use was disabled whenRwas built), otherwise possibly12(most 32-bit builds),16(most 64-bit builds) or 8

(CPUs such as ARM where for most compilers long double is identical to double).

sizeof.pointer the number of bytes in a CSEXPtype. Will be4on 32-bit builds and8on 64-bit builds ofR.

longdouble.eps, longdouble.neg.eps, longdouble.digits, ...

introduced inR4.0.0. Whencapabilities("long.double")is true, there are 10 such "longdouble.<kind>"values, specifying thelong double property corresponding to its"double.*"counterpart. See also ‘Note’.

Note

In the (typical) case wherecapabilities("long.double")is true,Ruses thelong doubleC type in quite a few places internally for accumulators in e.g.sum, reading non-integer numeric constants into (binary) double precision numbers, or arithmetic such asx %% y; also,long doublecan be read byreadBin.

For this reason, in that case, .Machine contains ten further components, longdouble.eps,

Références

Documents relatifs