• Non ci sono risultati.

Version 4.2.0 Under development (unstable) (2021-12-07)

N/A
N/A
Protected

Academic year: 2021

Condividi "Version 4.2.0 Under development (unstable) (2021-12-07)"

Copied!
3818
0
0

Testo completo

(1)

R: A Language and Environment for Statistical Computing

Reference Index

The R Core Team

Version 4.2.0 Under development (unstable) (2021-12-07)

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 The base package 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 . . . 304

library.dynam . . . 308

license . . . 310

list . . . 310

list.files . . . 312

list2DF . . . 314

list2env . . . 315

load . . . 316

locales . . . 318

log . . . 320

Logic . . . 322

(6)

v

logical . . . 324

LongVectors . . . 325

lower.tri . . . 326

ls . . . 327

make.names . . . 328

make.unique . . . 329

mapply . . . 330

marginSums . . . 332

mat.or.vec . . . 333

match . . . 333

match.arg . . . 335

match.call . . . 336

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 The compiler package 663 compile . . . 663

3 The datasets package 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 The grDevices package 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 The graphics package 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 . . . 930

panel.smooth . . . 933

par . . . 934

persp . . . 943

pie . . . 946

plot.data.frame . . . 948

plot.default . . . 949

plot.design . . . 952

plot.factor . . . 953

plot.formula . . . 954

plot.histogram . . . 956

plot.raster . . . 957

plot.table . . . 958

plot.window . . . 959

plot.xy . . . 960

points . . . 961

polygon . . . 965

polypath . . . 967

rasterImage . . . 969

rect . . . 970

rug . . . 971

screen . . . 972

segments . . . 974

smoothScatter . . . 975

spineplot . . . 977

stars . . . 980

stem . . . 983

stripchart . . . 984

strwidth . . . 985

sunflowerplot . . . 987

symbols . . . 989

text . . . 991

title . . . 994

units . . . 995

xspline . . . 996

6 The grid package 999 grid-package . . . 999

absolute.size . . . 1000

arrow . . . 1001

as.mask . . . 1001

calcStringMetric . . . 1002

dataViewport . . . 1004

depth . . . 1005

deviceLoc . . . 1006

drawDetails . . . 1007

editDetails . . . 1008

(15)

xiv

editViewport . . . 1009

explode . . . 1010

gEdit . . . 1010

getNames . . . 1011

gpar . . . 1012

gPath . . . 1014

Grid . . . 1015

Grid Viewports . . . 1015

grid.add . . . 1019

grid.bezier . . . 1020

grid.cap . . . 1021

grid.circle . . . 1022

grid.clip . . . 1023

grid.convert . . . 1025

grid.copy . . . 1027

grid.curve . . . 1027

grid.delay . . . 1029

grid.display.list . . . 1030

grid.DLapply . . . 1031

grid.draw . . . 1032

grid.edit . . . 1033

grid.force . . . 1034

grid.frame . . . 1036

grid.function . . . 1037

grid.get . . . 1039

grid.grab . . . 1040

grid.grep . . . 1042

grid.grill . . . 1043

grid.grob . . . 1044

grid.group . . . 1045

grid.layout . . . 1047

grid.lines . . . 1049

grid.locator . . . 1051

grid.ls . . . 1052

grid.move.to . . . 1054

grid.newpage . . . 1055

grid.null . . . 1056

grid.pack . . . 1057

grid.path . . . 1058

grid.place . . . 1061

grid.plot.and.legend . . . 1062

grid.points . . . 1063

grid.polygon . . . 1064

grid.pretty . . . 1065

grid.raster . . . 1066

grid.record . . . 1067

grid.rect . . . 1068

grid.refresh . . . 1070

grid.remove . . . 1070

grid.reorder . . . 1071

grid.segments . . . 1073

grid.set . . . 1074

(16)

xv

grid.show.layout . . . 1075

grid.show.viewport . . . 1076

grid.stroke . . . 1077

grid.text . . . 1079

grid.xaxis . . . 1081

grid.xspline . . . 1082

grid.yaxis . . . 1084

grobCoords . . . 1086

grobName . . . 1087

grobWidth . . . 1087

grobX . . . 1088

legendGrob . . . 1089

makeContent . . . 1090

patterns . . . 1091

plotViewport . . . 1093

Querying the Viewport Tree . . . 1093

resolveRasterSize . . . 1095

roundrect . . . 1096

showGrob . . . 1097

showViewport . . . 1098

stringWidth . . . 1099

unit . . . 1100

unit.c . . . 1102

unit.length . . . 1103

unit.pmin . . . 1103

unit.rep . . . 1104

unitType . . . 1105

valid.just . . . 1106

validDetails . . . 1107

viewportTransform . . . 1107

vpPath . . . 1109

widthDetails . . . 1110

Working with Viewports . . . 1111

xDetails . . . 1113

xsplinePoints . . . 1114

7 The methods package 1117 methods-package . . . 1117

.BasicFunsList . . . 1118

as . . . 1118

BasicClasses . . . 1120

callGeneric . . . 1121

callNextMethod . . . 1123

canCoerce . . . 1127

cbind2 . . . 1127

Classes . . . 1129

classesToAM . . . 1129

Classes_Details . . . 1131

className . . . 1134

classRepresentation-class . . . 1136

Documentation . . . 1137

dotsMethods . . . 1138

environment-class . . . 1141

(17)

xvi

envRefClass-class . . . 1142

evalSource . . . 1143

findClass . . . 1146

findMethods . . . 1147

fixPre1.8 . . . 1150

genericFunction-class . . . 1151

GenericFunctions . . . 1152

getClass . . . 1155

getMethod . . . 1157

getPackageName . . . 1160

hasArg . . . 1161

implicitGeneric . . . 1162

inheritedSlotNames . . . 1164

initialize-methods . . . 1165

Introduction . . . 1166

is . . . 1168

isSealedMethod . . . 1170

language-class . . . 1171

LinearMethodsList-class . . . 1172

LocalReferenceClasses . . . 1173

makeClassRepresentation . . . 1174

method.skeleton . . . 1175

MethodDefinition-class . . . 1176

Methods . . . 1177

MethodsList-class . . . 1177

Methods_Details . . . 1178

Methods_for_Nongenerics . . . 1182

Methods_for_S3 . . . 1187

MethodWithNext-class . . . 1189

new . . . 1190

nonStructure-class . . . 1192

ObjectsWithPackage-class . . . 1192

promptClass . . . 1193

promptMethods . . . 1194

ReferenceClasses . . . 1195

removeMethod . . . 1206

representation . . . 1207

S3Part . . . 1208

S4groupGeneric . . . 1211

SClassExtension-class . . . 1213

selectSuperClasses . . . 1214

setAs . . . 1215

setClass . . . 1218

setClassUnion . . . 1223

setGeneric . . . 1224

setGroupGeneric . . . 1228

setIs . . . 1229

setLoadActions . . . 1233

setMethod . . . 1236

setOldClass . . . 1240

show . . . 1243

showMethods . . . 1245

(18)

xvii

signature-class . . . 1247

slot . . . 1248

StructureClasses . . . 1250

testInheritedMethods . . . 1252

TraceClasses . . . 1253

validObject . . . 1254

8 The parallel package 1257 parallel-package . . . 1257

clusterApply . . . 1258

detectCores . . . 1261

makeCluster . . . 1262

mcaffinity . . . 1264

mcchildren . . . 1265

mcfork . . . 1267

mclapply . . . 1269

mcparallel . . . 1272

pvec . . . 1275

RNGstreams . . . 1277

splitIndices . . . 1278

9 The splines package 1281 splines-package . . . 1281

asVector . . . 1281

backSpline . . . 1282

bs . . . 1283

interpSpline . . . 1284

ns . . . 1285

periodicSpline . . . 1287

polySpline . . . 1288

predict.bs . . . 1289

predict.bSpline . . . 1290

splineDesign . . . 1291

splineKnots . . . 1292

splineOrder . . . 1293

xyVector . . . 1294

10 The stats package 1295 stats-package . . . 1295

.checkMFClasses . . . 1295

acf . . . 1296

acf2AR . . . 1299

add1 . . . 1299

addmargins . . . 1302

aggregate . . . 1303

AIC . . . 1306

alias . . . 1308

anova . . . 1309

anova.glm . . . 1310

anova.lm . . . 1311

anova.mlm . . . 1313

ansari.test . . . 1315

aov . . . 1317

(19)

xviii

approxfun . . . 1319

ar . . . 1322

ar.ols . . . 1325

arima . . . 1327

arima.sim . . . 1331

arima0 . . . 1332

ARMAacf . . . 1336

ARMAtoMA . . . 1337

as.hclust . . . 1338

asOneSidedFormula . . . 1339

ave . . . 1339

bandwidth . . . 1340

bartlett.test . . . 1342

Beta . . . 1343

binom.test . . . 1346

Binomial . . . 1348

biplot . . . 1349

biplot.princomp . . . 1351

birthday . . . 1352

Box.test . . . 1353

C . . . 1354

cancor . . . 1355

case+variable.names . . . 1357

Cauchy . . . 1358

chisq.test . . . 1359

Chisquare . . . 1361

cmdscale . . . 1364

coef . . . 1366

complete.cases . . . 1367

confint . . . 1368

constrOptim . . . 1369

contrast . . . 1371

contrasts . . . 1373

convolve . . . 1374

cophenetic . . . 1375

cor . . . 1377

cor.test . . . 1380

cov.wt . . . 1382

cpgram . . . 1384

cutree . . . 1385

decompose . . . 1386

delete.response . . . 1387

dendrapply . . . 1389

dendrogram . . . 1390

density . . . 1395

deriv . . . 1398

deviance . . . 1401

df.residual . . . 1402

diffinv . . . 1403

dist . . . 1404

Distributions . . . 1407

dummy.coef . . . 1408

(20)

xix

ecdf . . . 1409

eff.aovlist . . . 1411

effects . . . 1413

embed . . . 1414

expand.model.frame . . . 1415

Exponential . . . 1416

extractAIC . . . 1417

factanal . . . 1419

factor.scope . . . 1422

family . . . 1423

FDist . . . 1427

fft . . . 1429

filter . . . 1430

fisher.test . . . 1432

fitted . . . 1435

fivenum . . . 1436

fligner.test . . . 1436

formula . . . 1438

formula.nls . . . 1440

friedman.test . . . 1441

ftable . . . 1443

ftable.formula . . . 1444

GammaDist . . . 1446

Geometric . . . 1448

getInitial . . . 1450

glm . . . 1451

glm.control . . . 1456

glm.summaries . . . 1457

hclust . . . 1458

heatmap . . . 1461

HoltWinters . . . 1464

Hypergeometric . . . 1467

identify.hclust . . . 1469

influence.measures . . . 1470

integrate . . . 1474

interaction.plot . . . 1476

IQR . . . 1478

is.empty.model . . . 1479

isoreg . . . 1479

KalmanLike . . . 1481

kernapply . . . 1483

kernel . . . 1484

kmeans . . . 1486

kruskal.test . . . 1488

ks.test . . . 1490

ksmooth . . . 1492

lag . . . 1493

lag.plot . . . 1494

line . . . 1496

listof . . . 1497

lm . . . 1497

lm.fit . . . 1501

(21)

xx

lm.influence . . . 1502

lm.summaries . . . 1504

loadings . . . 1505

loess . . . 1506

loess.control . . . 1509

Logistic . . . 1510

logLik . . . 1511

loglin . . . 1513

Lognormal . . . 1515

lowess . . . 1516

ls.diag . . . 1517

ls.print . . . 1519

lsfit . . . 1519

mad . . . 1521

mahalanobis . . . 1522

make.link . . . 1523

makepredictcall . . . 1524

manova . . . 1525

mantelhaen.test . . . 1526

mauchly.test . . . 1528

mcnemar.test . . . 1530

median . . . 1531

medpolish . . . 1532

model.extract . . . 1533

model.frame . . . 1534

model.matrix . . . 1537

model.tables . . . 1538

monthplot . . . 1540

mood.test . . . 1542

Multinom . . . 1543

na.action . . . 1544

na.contiguous . . . 1545

na.fail . . . 1546

naprint . . . 1547

naresid . . . 1547

NegBinomial . . . 1548

nextn . . . 1550

nlm . . . 1551

nlminb . . . 1554

nls . . . 1556

nls.control . . . 1562

NLSstAsymptotic . . . 1563

NLSstClosestX . . . 1564

NLSstLfAsymptote . . . 1565

NLSstRtAsymptote . . . 1566

nobs . . . 1566

Normal . . . 1567

numericDeriv . . . 1569

offset . . . 1570

oneway.test . . . 1571

optim . . . 1572

optimize . . . 1577

(22)

xxi order.dendrogram . . . 1579 p.adjust . . . 1580 Pair . . . 1582 pairwise.prop.test . . . 1583 pairwise.t.test . . . 1584 pairwise.table . . . 1585 pairwise.wilcox.test . . . 1585 plot.acf . . . 1586 plot.density . . . 1588 plot.HoltWinters . . . 1588 plot.isoreg . . . 1589 plot.lm . . . 1591 plot.ppr . . . 1594 plot.profile.nls . . . 1595 plot.spec . . . 1597 plot.stepfun . . . 1598 plot.ts . . . 1600 Poisson . . . 1601 poisson.test . . . 1603 poly . . . 1604 power . . . 1606 power.anova.test . . . 1607 power.prop.test . . . 1608 power.t.test . . . 1610 PP.test . . . 1611 ppoints . . . 1612 ppr . . . 1613 prcomp . . . 1617 predict . . . 1619 predict.Arima . . . 1620 predict.glm . . . 1622 predict.HoltWinters . . . 1623 predict.lm . . . 1625 predict.loess . . . 1627 predict.nls . . . 1629 predict.smooth.spline . . . 1630 preplot . . . 1631 princomp . . . 1632 print.power.htest . . . 1634 print.ts . . . 1635 printCoefmat . . . 1636 profile . . . 1638 profile.nls . . . 1638 proj . . . 1639 prop.test . . . 1641 prop.trend.test . . . 1643 qqnorm . . . 1644 quade.test . . . 1646 quantile . . . 1648 r2dtable . . . 1650 read.ftable . . . 1651 rect.hclust . . . 1654

(23)

xxii

relevel . . . 1655 reorder.default . . . 1655 reorder.dendrogram . . . 1657 replications . . . 1658 reshape . . . 1659 residuals . . . 1663 runmed . . . 1664 rWishart . . . 1666 scatter.smooth . . . 1668 screeplot . . . 1669 sd . . . 1670 se.contrast . . . 1670 selfStart . . . 1672 setNames . . . 1674 shapiro.test . . . 1675 sigma . . . 1676 SignRank . . . 1678 simulate . . . 1679 smooth . . . 1681 smooth.spline . . . 1683 smoothEnds . . . 1688 sortedXyData . . . 1689 spec.ar . . . 1690 spec.pgram . . . 1691 spec.taper . . . 1693 spectrum . . . 1694 splinefun . . . 1696 SSasymp . . . 1699 SSasympOff . . . 1701 SSasympOrig . . . 1702 SSbiexp . . . 1704 SSD . . . 1705 SSfol . . . 1706 SSfpl . . . 1708 SSgompertz . . . 1709 SSlogis . . . 1710 SSmicmen . . . 1712 SSweibull . . . 1713 start . . . 1714 stat.anova . . . 1715 stats-deprecated . . . 1716 step . . . 1716 stepfun . . . 1718 stl . . . 1720 stlmethods . . . 1723 StructTS . . . 1724 summary.aov . . . 1726 summary.glm . . . 1727 summary.lm . . . 1729 summary.manova . . . 1731 summary.nls . . . 1733 summary.princomp . . . 1734

(24)

xxiii supsmu . . . 1735 symnum . . . 1736 t.test . . . 1738 TDist . . . 1740 termplot . . . 1743 terms . . . 1745 terms.formula . . . 1746 terms.object . . . 1747 time . . . 1748 toeplitz . . . 1749 ts . . . 1750 ts-methods . . . 1752 ts.plot . . . 1752 ts.union . . . 1753 tsdiag . . . 1754 tsp . . . 1755 tsSmooth . . . 1756 Tukey . . . 1756 TukeyHSD . . . 1758 Uniform . . . 1759 uniroot . . . 1761 update . . . 1764 update.formula . . . 1765 var.test . . . 1766 varimax . . . 1767 vcov . . . 1768 Weibull . . . 1769 weighted.mean . . . 1771 weighted.residuals . . . 1772 weights . . . 1773 wilcox.test . . . 1773 Wilcoxon . . . 1777 window . . . 1779 xtabs . . . 1780

11 The stats4 package 1785

stats4-package . . . 1785 coef-methods . . . 1785 confint-methods . . . 1786 logLik-methods . . . 1786 mle . . . 1786 mle-class . . . 1790 plot-methods . . . 1791 profile-methods . . . 1791 profile.mle-class . . . 1792 show-methods . . . 1793 summary-methods . . . 1793 summary.mle-class . . . 1794 update-methods . . . 1794 vcov-methods . . . 1795

12 The tcltk package 1797

tcltk-package . . . 1797

(25)

xxiv

TclInterface . . . 1797 tclServiceMode . . . 1802 TkCommands . . . 1802 tkpager . . . 1806 tkProgressBar . . . 1807 tkStartGUI . . . 1808 TkWidgetcmds . . . 1808 TkWidgets . . . 1811 tk_choose.dir . . . 1813 tk_choose.files . . . 1814 tk_messageBox . . . 1815 tk_select.list . . . 1815

13 The tools package 1817

tools-package . . . 1817 .print.via.format . . . 1817 add_datalist . . . 1818 assertCondition . . . 1819 bibstyle . . . 1820 buildVignette . . . 1822 buildVignettes . . . 1823 charsets . . . 1825 checkFF . . . 1825 checkMD5sums . . . 1827 checkPoFiles . . . 1827 checkRd . . . 1829 checkRdaFiles . . . 1831 checkTnF . . . 1832 checkVignettes . . . 1833 check_packages_in_dir . . . 1834 codoc . . . 1836 compactPDF . . . 1838 CRANtools . . . 1839 delimMatch . . . 1841 dependsOnPkgs . . . 1842 encoded_text_to_latex . . . 1843 fileutils . . . 1845 find_gs_cmd . . . 1846 getVignetteInfo . . . 1847 HTMLheader . . . 1848 HTMLlinks . . . 1849 loadRdMacros . . . 1849 makevars . . . 1851 make_translations_pkg . . . 1851 md5sum . . . 1852 package_dependencies . . . 1853 package_native_routine_registration_skeleton . . . 1854 parseLatex . . . 1857 parse_Rd . . . 1858 pskill . . . 1859 psnice . . . 1861 QC . . . 1862 Rcmd . . . 1863

(26)

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

14 The utils package 1893

utils-package . . . 1893 adist . . . 1893 alarm . . . 1895 apropos . . . 1896 aregexec . . . 1897 arrangeWindows . . . 1898 askYesNo . . . 1900 aspell . . . 1901 aspell-utils . . . 1903 available.packages . . . 1904 BATCH . . . 1907 bibentry . . . 1908 browseEnv . . . 1912 browseURL . . . 1913 browseVignettes . . . 1915 bug.report . . . 1916 capture.output . . . 1918 changedFiles . . . 1919 charClass . . . 1921 choose.dir . . . 1923 choose.files . . . 1924 chooseBioCmirror . . . 1925 chooseCRANmirror . . . 1926 citation . . . 1927 cite . . . 1928 citEntry . . . 1931 clipboard . . . 1932

(27)

xxvi

close.socket . . . 1933 combn . . . 1934 compareVersion . . . 1935 COMPILE . . . 1936 contrib.url . . . 1937 count.fields . . . 1937 create.post . . . 1938 data . . . 1940 dataentry . . . 1942 debugcall . . . 1944 debugger . . . 1945 demo . . . 1947 DLL.version . . . 1949 download.file . . . 1949 download.packages . . . 1953 edit . . . 1954 edit.data.frame . . . 1956 example . . . 1957 file.edit . . . 1959 file_test . . . 1960 findLineNum . . . 1961 fix . . . 1963 flush.console . . . 1964 format . . . 1964 getAnywhere . . . 1965 getFromNamespace . . . 1966 getParseData . . . 1968 getS3method . . . 1970 getWindowsHandle . . . 1971 getWindowsHandles . . . 1972 glob2rx . . . 1973 globalVariables . . . 1974 hashtab . . . 1976 hasName . . . 1978 head . . . 1979 help . . . 1982 help.request . . . 1985 help.search . . . 1986 help.start . . . 1988 hsearch-utils . . . 1989 INSTALL . . . 1991 install.packages . . . 1993 installed.packages . . . 1998 isS3method . . . 2000 isS3stdGeneric . . . 2001 LINK . . . 2001 localeToCharset . . . 2002 ls.str . . . 2003 maintainer . . . 2005 make.packages.html . . . 2006 make.socket . . . 2007 menu . . . 2008

(28)

xxvii methods . . . 2009 mirrorAdmin . . . 2011 modifyList . . . 2012 news . . . 2012 nsl . . . 2015 object.size . . . 2015 package.skeleton . . . 2018 packageDescription . . . 2020 packageName . . . 2022 packageStatus . . . 2022 page . . . 2024 person . . . 2025 PkgUtils . . . 2028 process.events . . . 2029 prompt . . . 2030 promptData . . . 2032 promptPackage . . . 2033 Question . . . 2034 rcompgen . . . 2036 read.DIF . . . 2041 read.fortran . . . 2043 read.fwf . . . 2044 read.socket . . . 2046 read.table . . . 2047 readRegistry . . . 2052 recover . . . 2053 relist . . . 2054 REMOVE . . . 2056 remove.packages . . . 2057 removeSource . . . 2058 RHOME . . . 2059 roman . . . 2059 Rprof . . . 2061 Rprofmem . . . 2063 Rscript . . . 2065 RShowDoc . . . 2066 RSiteSearch . . . 2067 rtags . . . 2068 Rtangle . . . 2070 RweaveLatex . . . 2072 Rwin configuration . . . 2076 savehistory . . . 2077 select.list . . . 2079 sessionInfo . . . 2080 setRepositories . . . 2082 setWindowTitle . . . 2083 SHLIB . . . 2084 shortPathName . . . 2085 sourceutils . . . 2086 stack . . . 2087 str . . . 2089 strcapture . . . 2092

(29)

xxviii

summaryRprof . . . 2093 Sweave . . . 2095 SweaveSyntConv . . . 2097 tar . . . 2098 toLatex . . . 2101 txtProgressBar . . . 2102 type.convert . . . 2103 untar . . . 2105 unzip . . . 2108 update.packages . . . 2109 url.show . . . 2111 URLencode . . . 2112 utils-deprecated . . . 2113 View . . . 2113 vignette . . . 2114 warnErrList . . . 2116 winDialog . . . 2117 winextras . . . 2118 winMenus . . . 2118 winProgressBar . . . 2120 write.table . . . 2121 zip . . . 2124

II 2127

15 The KernSmooth package 2129

bkde . . . 2129 bkde2D . . . 2130 bkfe . . . 2132 dpih . . . 2133 dpik . . . 2134 dpill . . . 2135 locpoly . . . 2137

16 The MASS package 2139

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

(30)

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

(31)

xxx

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

(32)

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

17 The Matrix package 2287

abIndex-class . . . 2287 abIseq . . . 2288 all-methods . . . 2289 all.equal-methods . . . 2290 atomicVector-class . . . 2290 band . . . 2291 bandSparse . . . 2292 bdiag . . . 2293 BunchKaufman-methods . . . 2295 CAex . . . 2297 cBind . . . 2298 CHMfactor-class . . . 2299 chol . . . 2302 chol2inv-methods . . . 2304 Cholesky . . . 2304 Cholesky-class . . . 2307 colSums . . . 2308 compMatrix-class . . . 2310

(33)

xxxii

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

(34)

xxxiii Matrix . . . 2372 Matrix-class . . . 2374 matrix-products . . . 2376 MatrixClass . . . 2378 MatrixFactorization-class . . . 2379 ndenseMatrix-class . . . 2380 nearPD . . . 2381 ngeMatrix-class . . . 2384 nMatrix-class . . . 2385 nnzero . . . 2386 norm . . . 2387 nsparseMatrix-classes . . . 2388 nsyMatrix-class . . . 2390 ntrMatrix-class . . . 2391 number-class . . . 2392 pMatrix-class . . . 2392 printSpMatrix . . . 2394 qr-methods . . . 2397 rankMatrix . . . 2399 rcond . . . 2401 rep2abI . . . 2403 replValue-class . . . 2404 rleDiff-class . . . 2405 rsparsematrix . . . 2405 RsparseMatrix-class . . . 2407 Schur . . . 2408 Schur-class . . . 2409 solve-methods . . . 2410 sparse.model.matrix . . . 2413 sparseLU-class . . . 2415 SparseM-conversions . . . 2416 sparseMatrix . . . 2417 sparseMatrix-class . . . 2420 sparseQR-class . . . 2422 sparseVector . . . 2424 sparseVector-class . . . 2425 spMatrix . . . 2428 symmetricMatrix-class . . . 2429 symmpart . . . 2431 triangularMatrix-class . . . 2432 TsparseMatrix-class . . . 2433 uniqTsparse . . . 2434 unpack . . . 2435 Unused-classes . . . 2437 updown . . . 2437 USCounties . . . 2438 wrld_1deg . . . 2439 [-methods . . . 2440 [<–methods . . . 2441

%&%-methods . . . 2442

18 The boot package 2445

abc.ci . . . 2445

(35)

xxxiv

acme . . . 2447 aids . . . 2447 aircondit . . . 2448 amis . . . 2449 aml . . . 2450 beaver . . . 2451 bigcity . . . 2452 boot . . . 2452 boot.array . . . 2458 boot.ci . . . 2459 brambles . . . 2462 breslow . . . 2463 calcium . . . 2464 cane . . . 2465 capability . . . 2466 catsM . . . 2466 cav . . . 2467 cd4 . . . 2468 cd4.nested . . . 2468 censboot . . . 2469 channing . . . 2473 claridge . . . 2474 cloth . . . 2475 co.transfer . . . 2475 coal . . . 2476 control . . . 2477 corr . . . 2479 cum3 . . . 2479 cv.glm . . . 2480 darwin . . . 2482 dogs . . . 2483 downs.bc . . . 2483 ducks . . . 2484 EEF.profile . . . 2485 empinf . . . 2486 envelope . . . 2488 exp.tilt . . . 2490 fir . . . 2492 freq.array . . . 2492 frets . . . 2493 glm.diag . . . 2494 glm.diag.plots . . . 2495 gravity . . . 2496 hirose . . . 2497 Imp.Estimates . . . 2498 imp.weights . . . 2500 inv.logit . . . 2501 islay . . . 2502 jack.after.boot . . . 2502 k3.linear . . . 2504 linear.approx . . . 2505 lines.saddle.distn . . . 2507

(36)

xxxv logit . . . 2509 manaus . . . 2509 melanoma . . . 2510 motor . . . 2511 neuro . . . 2512 nitrofen . . . 2512 nodal . . . 2513 norm.ci . . . 2514 nuclear . . . 2516 paulsen . . . 2517 plot.boot . . . 2517 poisons . . . 2520 polar . . . 2520 print.boot . . . 2521 print.bootci . . . 2522 print.saddle.distn . . . 2523 print.simplex . . . 2523 remission . . . 2524 saddle . . . 2525 saddle.distn . . . 2527 saddle.distn.object . . . 2530 salinity . . . 2531 simplex . . . 2531 simplex.object . . . 2533 smooth.f . . . 2534 sunspot . . . 2536 survival . . . 2536 tau . . . 2537 tilt.boot . . . 2538 tsboot . . . 2541 tuna . . . 2544 urine . . . 2545 var.linear . . . 2546 wool . . . 2546

19 The class package 2549

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

(37)

xxxvi

20 The cluster package 2565

agnes . . . 2565 agnes.object . . . 2569 agriculture . . . 2570 animals . . . 2571 bannerplot . . . 2572 chorSub . . . 2574 clara . . . 2575 clara.object . . . 2578 clusGap . . . 2579 clusplot . . . 2583 clusplot.default . . . 2584 coef.hclust . . . 2588 daisy . . . 2589 diana . . . 2592 dissimilarity.object . . . 2594 ellipsoidhull . . . 2595 fanny . . . 2597 fanny.object . . . 2599 flower . . . 2601 lower.to.upper.tri.inds . . . 2602 mona . . . 2602 mona.object . . . 2604 pam . . . 2605 pam.object . . . 2608 partition.object . . . 2610 plantTraits . . . 2611 plot.agnes . . . 2612 plot.diana . . . 2614 plot.mona . . . 2616 plot.partition . . . 2617 pltree . . . 2619 pluton . . . 2620 predict.ellipsoid . . . 2621 print.agnes . . . 2622 print.clara . . . 2623 print.diana . . . 2623 print.dissimilarity . . . 2624 print.fanny . . . 2625 print.mona . . . 2625 print.pam . . . 2626 ruspini . . . 2626 silhouette . . . 2627 sizeDiss . . . 2630 summary.agnes . . . 2631 summary.clara . . . 2631 summary.diana . . . 2632 summary.mona . . . 2633 summary.pam . . . 2633 twins.object . . . 2634 volume.ellipsoid . . . 2634 votes.repub . . . 2635

(38)

xxxvii

xclara . . . 2636

21 The codetools package 2639

checkUsage . . . 2639 codetools . . . 2640 findGlobals . . . 2642 showTree . . . 2642

22 The foreign package 2645

lookup.xport . . . 2645 read.arff . . . 2646 read.dbf . . . 2646 read.dta . . . 2648 read.epiinfo . . . 2649 read.mtp . . . 2650 read.octave . . . 2651 read.spss . . . 2652 read.ssd . . . 2655 read.systat . . . 2657 read.xport . . . 2658 S3 read functions . . . 2659 write.arff . . . 2660 write.dbf . . . 2661 write.dta . . . 2662 write.foreign . . . 2664

23 The lattice package 2667

A_01_Lattice . . . 2667 B_00_xyplot . . . 2670 B_01_xyplot.ts . . . 2687 B_02_barchart.table . . . 2690 B_03_histogram . . . 2692 B_04_qqmath . . . 2696 B_05_qq . . . 2699 B_06_levelplot . . . 2701 B_07_cloud . . . 2706 B_08_splom . . . 2711 B_09_tmd . . . 2715 B_10_rfs . . . 2716 B_11_oneway . . . 2717 C_01_trellis.device . . . 2718 C_02_trellis.par.get . . . 2720 C_03_simpleTheme . . . 2723 C_04_lattice.options . . . 2725 C_05_print.trellis . . . 2726 C_06_update.trellis . . . 2730 C_07_shingles . . . 2732 D_draw.colorkey . . . 2734 D_draw.key . . . 2735 D_level.colors . . . 2735 D_make.groups . . . 2737 D_simpleKey . . . 2738 D_strip.default . . . 2739

(39)

xxxviii

D_trellis.object . . . 2741 E_interaction . . . 2742 F_1_panel.barchart . . . 2748 F_1_panel.bwplot . . . 2750 F_1_panel.cloud . . . 2752 F_1_panel.densityplot . . . 2756 F_1_panel.dotplot . . . 2757 F_1_panel.histogram . . . 2758 F_1_panel.levelplot . . . 2759 F_1_panel.pairs . . . 2761 F_1_panel.parallel . . . 2764 F_1_panel.qqmath . . . 2765 F_1_panel.stripplot . . . 2767 F_1_panel.xyplot . . . 2768 F_2_llines . . . 2770 F_2_panel.functions . . . 2773 F_2_panel.loess . . . 2776 F_2_panel.qqmathline . . . 2777 F_2_panel.smoothScatter . . . 2778 F_2_panel.spline . . . 2780 F_2_panel.superpose . . . 2781 F_2_panel.violin . . . 2783 F_3_prepanel.default . . . 2784 F_3_prepanel.functions . . . 2786 G_axis.default . . . 2787 G_banking . . . 2790 G_latticeParseFormula . . . 2792 G_packet.panel.default . . . 2793 G_panel.axis . . . 2794 G_panel.number . . . 2796 G_Rows . . . 2797 G_utilities.3d . . . 2798 H_barley . . . 2799 H_environmental . . . 2800 H_ethanol . . . 2801 H_melanoma . . . 2802 H_singer . . . 2803 H_USMortality . . . 2804 I_lset . . . 2806

24 The mgcv package 2807

anova.gam . . . 2807 bam . . . 2809 bam.update . . . 2815 bandchol . . . 2817 betar . . . 2818 blas.thread.test . . . 2819 bug.reports.mgcv . . . 2820 choldrop . . . 2820 choose.k . . . 2822 columb . . . 2824 concurvity . . . 2825 cox.ph . . . 2827

(40)

xxxix cox.pht . . . 2831 cSplineDes . . . 2833 dDeta . . . 2834 exclude.too.far . . . 2835 extract.lme.cov . . . 2836 family.mgcv . . . 2838 FFdes . . . 2839 fix.family.link . . . 2840 fixDependence . . . 2841 formula.gam . . . 2842 formXtViX . . . 2844 fs.test . . . 2845 full.score . . . 2846 gam . . . 2847 gam.check . . . 2856 gam.control . . . 2858 gam.convergence . . . 2861 gam.fit . . . 2862 gam.fit3 . . . 2863 gam.fit5.post.proc . . . 2866 gam.mh . . . 2867 gam.models . . . 2869 gam.outer . . . 2875 gam.reparam . . . 2877 gam.scale . . . 2878 gam.selection . . . 2878 gam.side . . . 2881 gam.vcomp . . . 2883 gam2objective . . . 2885 gamlss.etamu . . . 2886 gamlss.gH . . . 2887 gamm . . . 2888 gammals . . . 2894 gamObject . . . 2896 gamSim . . . 2899 gaulss . . . 2900 get.var . . . 2901 gevlss . . . 2902 ginla . . . 2904 gumbls . . . 2907 identifiability . . . 2908 in.out . . . 2909 influence.gam . . . 2910 initial.sp . . . 2911 inSide . . . 2912 interpret.gam . . . 2913 jagam . . . 2914 k.check . . . 2919 ldetS . . . 2920 ldTweedie . . . 2921 linear.functional.terms . . . 2923 logLik.gam . . . 2926

(41)

xl

ls.size . . . 2928 magic . . . 2929 magic.post.proc . . . 2933 mgcv.FAQ . . . 2934 mgcv.package . . . 2936 mgcv.parallel . . . 2938 mini.roots . . . 2940 missing.data . . . 2941 model.matrix.gam . . . 2942 mono.con . . . 2943 mroot . . . 2944 multinom . . . 2945 mvn . . . 2947 negbin . . . 2948 new.name . . . 2950 notExp . . . 2951 notExp2 . . . 2952 null.space.dimension . . . 2954 ocat . . . 2955 one.se.rule . . . 2956 pcls . . . 2957 pdIdnot . . . 2961 pdTens . . . 2962 pen.edf . . . 2963 place.knots . . . 2964 plot.gam . . . 2965 polys.plot . . . 2970 predict.bam . . . 2971 predict.gam . . . 2974 Predict.matrix . . . 2979 Predict.matrix.cr.smooth . . . 2981 Predict.matrix.soap.film . . . 2982 print.gam . . . 2984 psum.chisq . . . 2985 qq.gam . . . 2987 random.effects . . . 2989 residuals.gam . . . 2991 rig . . . 2992 rmvn . . . 2993 Rrank . . . 2994 rTweedie . . . 2995 s . . . 2996 scat . . . 2999 sdiag . . . 3000 shash . . . 3001 single.index . . . 3003 Sl.inirep . . . 3005 Sl.repara . . . 3006 Sl.setup . . . 3006 slanczos . . . 3007 smooth.construct . . . 3008 smooth.construct.ad.smooth.spec . . . 3013

(42)

xli smooth.construct.bs.smooth.spec . . . 3016 smooth.construct.cr.smooth.spec . . . 3019 smooth.construct.ds.smooth.spec . . . 3021 smooth.construct.fs.smooth.spec . . . 3023 smooth.construct.gp.smooth.spec . . . 3025 smooth.construct.mrf.smooth.spec . . . 3028 smooth.construct.ps.smooth.spec . . . 3031 smooth.construct.re.smooth.spec . . . 3033 smooth.construct.so.smooth.spec . . . 3036 smooth.construct.sos.smooth.spec . . . 3041 smooth.construct.t2.smooth.spec . . . 3044 smooth.construct.tensor.smooth.spec . . . 3045 smooth.construct.tp.smooth.spec . . . 3046 smooth.info . . . 3049 smooth.terms . . . 3050 smooth2random . . . 3053 smoothCon . . . 3055 sp.vcov . . . 3058 spasm.construct . . . 3059 step.gam . . . 3060 summary.gam . . . 3061 t2 . . . 3065 te . . . 3069 tensor.prod.model.matrix . . . 3073 totalPenaltySpace . . . 3075 trichol . . . 3076 trind.generator . . . 3077 Tweedie . . . 3078 twlss . . . 3080 uniquecombs . . . 3081 vcov.gam . . . 3083 vis.gam . . . 3084 XWXd . . . 3086 ziP . . . 3089 ziplss . . . 3091

25 The nlme package 3095

ACF . . . 3095 ACF.gls . . . 3096 ACF.lme . . . 3097 Alfalfa . . . 3098 allCoef . . . 3099 anova.gls . . . 3100 anova.lme . . . 3102 as.matrix.corStruct . . . 3104 as.matrix.pdMat . . . 3105 as.matrix.reStruct . . . 3106 asOneFormula . . . 3107 Assay . . . 3108 asTable . . . 3108 augPred . . . 3109 balancedGrouped . . . 3111 bdf . . . 3112

(43)

xlii

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

(44)

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

(45)

xliv

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

(46)

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

(47)

xlvi

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

(48)

xlvii varPower . . . 3383 varWeights . . . 3384 varWeights.glsStruct . . . 3385 varWeights.lmeStruct . . . 3385 Wafer . . . 3386 Wheat . . . 3387 Wheat2 . . . 3387 [.pdMat . . . 3388

26 The nnet package 3389

class.ind . . . 3389 multinom . . . 3390 nnet . . . 3391 nnetHess . . . 3394 predict.nnet . . . 3395 which.is.max . . . 3396

27 The rpart package 3397

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

28 The spatial package 3427

anova.trls . . . 3427 correlogram . . . 3428 expcov . . . 3429 Kaver . . . 3430 Kenvl . . . 3431 Kfn . . . 3432

(49)

xlviii

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

29 The survival package 3447

aareg . . . 3447 aeqSurv . . . 3450 aggregate.survfit . . . 3451 agreg.fit . . . 3452 aml . . . 3453 anova.coxph . . . 3453 attrassign . . . 3454 basehaz . . . 3456 bladder . . . 3456 blogit . . . 3458 cch . . . 3459 cgd . . . 3461 cgd0 . . . 3462 cipoisson . . . 3463 clogit . . . 3464 cluster . . . 3466 colon . . . 3467 concordance . . . 3468 concordancefit . . . 3470 cox.zph . . . 3471 coxph . . . 3473 coxph.control . . . 3477 coxph.detail . . . 3479 coxph.object . . . 3480 coxph.wtest . . . 3481 coxsurv.fit . . . 3482 diabetic . . . 3483 dsurvreg . . . 3484 finegray . . . 3485 flchain . . . 3487 frailty . . . 3489 gbsg . . . 3491 heart . . . 3492 is.ratetable . . . 3493 kidney . . . 3493 levels.Surv . . . 3494

(50)

xlix lines.survfit . . . 3495 logan . . . 3497 logLik.coxph . . . 3498 lung . . . 3499 mgus . . . 3500 mgus2 . . . 3501 model.frame.coxph . . . 3502 model.matrix.coxph . . . 3503 myeloid . . . 3504 myeloma . . . 3505 nafld . . . 3505 neardate . . . 3507 nsk . . . 3508 nwtco . . . 3510 ovarian . . . 3511 pbc . . . 3512 pbcseq . . . 3513 plot.aareg . . . 3515 plot.cox.zph . . . 3515 plot.survfit . . . 3517 predict.coxph . . . 3520 predict.survreg . . . 3522 print.aareg . . . 3523 print.summary.coxph . . . 3524 print.summary.survexp . . . 3525 print.summary.survfit . . . 3525 print.survfit . . . 3526 pseudo . . . 3527 pspline . . . 3529 pyears . . . 3530 quantile.survfit . . . 3533 ratetable . . . 3534 ratetableDate . . . 3535 ratetables . . . 3536 rats . . . 3537 rats2 . . . 3538 reliability . . . 3538 residuals.coxph . . . 3540 residuals.survfit . . . 3541 residuals.survreg . . . 3542 retinopathy . . . 3544 rhDNase . . . 3545 ridge . . . 3546 rotterdam . . . 3547 royston . . . 3549 rttright . . . 3550 solder . . . 3551 stanford2 . . . 3552 statefig . . . 3552 strata . . . 3554 summary.aareg . . . 3555 summary.coxph . . . 3557

(51)

l

summary.pyears . . . 3558 summary.survexp . . . 3559 summary.survfit . . . 3560 Surv . . . 3562 Surv-methods . . . 3564 Surv2 . . . 3566 Surv2data . . . 3567 survcheck . . . 3568 survdiff . . . 3569 survexp . . . 3571 survexp.fit . . . 3574 survexp.object . . . 3575 survfit . . . 3576 survfit.coxph . . . 3577 survfit.formula . . . 3579 survfit.matrix . . . 3583 survfit.object . . . 3585 survfit0 . . . 3587 survfitcoxph.fit . . . 3588 survival-deprecated . . . 3589 survobrien . . . 3590 survreg . . . 3591 survreg.control . . . 3593 survreg.distributions . . . 3594 survreg.object . . . 3595 survregDtest . . . 3596 survSplit . . . 3597 tcut . . . 3599 tmerge . . . 3600 tobin . . . 3602 transplant . . . 3603 udca . . . 3604 untangle.specials . . . 3605 uspop2 . . . 3606 vcov.coxph . . . 3607 veteran . . . 3607 xtfrm.Surv . . . 3608 yates . . . 3609 yates_setup . . . 3610

Index 3613

(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 let R 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, for right = 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, thebreaks do 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 = TRUE and it is the first (or last for right = FALSE) interval.

Value

An integer vector of the same length asx indicating which bin each element falls into (the leftmost bin being bin1). NaN and NA elements of x are mapped to NA codes, 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

.Device is a length-one character vector.

.Devices is 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

.Machine is a variable holding information on the numerical characteristics of the machine R is 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 R use 32-bit integers and use IEC 60559 floating-point (double precision) arithmetic, the"integer"

and"double" related values are the same for almost all R builds.

Note that on most platforms smaller positive values than.Machine$double.xmin can occur. On a typical R platform 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.digits if either double.base is 2 or double.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.eps may 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. Normally 2.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: normally 53.

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;

Riferimenti

Documenti correlati

Parole crociate = CROSSWORDS(krò:sue*dz) Disegno = DRAWING(drò:ing) Troppo grasso = TOO FAT(tù;fàet) Pittura = PAINTING(pèinting) Troppo pigro = TOO LAZY(tù:lèizi) Camminare =

In other words, the homogeneous linear systems associated to row equivalent matrices have the same solutions. This follows because each individual ERO leaves unchanged the solu-

By (RC1), solutions only exist if all these ranks are

• For a Windows or Mac OS X binary package install, install.packages() will check if a source package is available on the same repositories, and report if it is a later version or

The RC-designs obtained by Mehta and Puri (1990) by deleting a column in Youden Squares, the General efficiency balanced RC- designs by Gupta and Gandhi Prasad (1990), the

This paper has highlighted the effect of NaOH treatment on the bacterial ecology of olives fermentation and the necessity of investigating table olive fermentations as two

• nurses who have undertaken a two year training leading to a qualification as a second level (enrolled nurse) in general, mental health or learning disability nursing • nurses

Time evolution of the dilution index obtained by pore-scale particle tracking and our model 2 for selected values of Pethr, for (a) the bead pack and (b) the sandstone