+ All Categories
Home > Documents > An Introduction to RR What is R? Interaction Infrastructure Getting Help Conclusion Outline 1 R 2...

An Introduction to RR What is R? Interaction Infrastructure Getting Help Conclusion Outline 1 R 2...

Date post: 15-Jul-2020
Category:
Upload: others
View: 1 times
Download: 0 times
Share this document with a friend
24
R What is R? Interaction Infrastructure Getting Help Conclusion An Introduction to R Andrew Robinson Department of Mathematics & Statistics University of Melbourne February 15, 2006 Andrew Robinson An Introduction to R
Transcript
Page 1: An Introduction to RR What is R? Interaction Infrastructure Getting Help Conclusion Outline 1 R 2 What is R? Why use R? Why avoid R? 3 Interaction 4 Infrastructure 5 Getting Help 6

RWhat is R?Interaction

InfrastructureGetting Help

Conclusion

An Introduction to R

Andrew Robinson

Department of Mathematics & StatisticsUniversity of Melbourne

February 15, 2006

Andrew Robinson An Introduction to R

Page 2: An Introduction to RR What is R? Interaction Infrastructure Getting Help Conclusion Outline 1 R 2 What is R? Why use R? Why avoid R? 3 Interaction 4 Infrastructure 5 Getting Help 6

RWhat is R?Interaction

InfrastructureGetting Help

Conclusion

Outline

1 R

2 What is R?Why use R?Why avoid R?

3 Interaction

4 Infrastructure

5 Getting Help

6 Conclusion

Andrew Robinson An Introduction to R

Page 3: An Introduction to RR What is R? Interaction Infrastructure Getting Help Conclusion Outline 1 R 2 What is R? Why use R? Why avoid R? 3 Interaction 4 Infrastructure 5 Getting Help 6

RWhat is R?Interaction

InfrastructureGetting Help

Conclusion

Why use R?Why avoid R?

Characteristics

R is a programming language that has been optimized fordata analysis and modeling.

R can be used as an object-oriented programming language,or as a statistical environment within which sets ofinstructions can be performed automatically.

Andrew Robinson An Introduction to R

Page 4: An Introduction to RR What is R? Interaction Infrastructure Getting Help Conclusion Outline 1 R 2 What is R? Why use R? Why avoid R? 3 Interaction 4 Infrastructure 5 Getting Help 6

RWhat is R?Interaction

InfrastructureGetting Help

Conclusion

Why use R?Why avoid R?

Characteristics

R is a programming language that has been optimized fordata analysis and modeling.

R can be used as an object-oriented programming language,or as a statistical environment within which sets ofinstructions can be performed automatically.

Andrew Robinson An Introduction to R

Page 5: An Introduction to RR What is R? Interaction Infrastructure Getting Help Conclusion Outline 1 R 2 What is R? Why use R? Why avoid R? 3 Interaction 4 Infrastructure 5 Getting Help 6

RWhat is R?Interaction

InfrastructureGetting Help

Conclusion

Why use R?Why avoid R?

Utility

1 R runs on Windows, Mac-OS, and Unix variants;2 R provides a vast number of useful statistical tools;

1 many of which have been painstakingly tested;

3 R produces publication-quality graphics in a variety of formats;

4 R plays well with LATEX via the Sweave package;

5 R plays well with FORTRAN, C, and shell scripts;

6 R scales, making it useful for small and large projects;

7 R is object-oriented;

8 R eschews the GUI.

Andrew Robinson An Introduction to R

Page 6: An Introduction to RR What is R? Interaction Infrastructure Getting Help Conclusion Outline 1 R 2 What is R? Why use R? Why avoid R? 3 Interaction 4 Infrastructure 5 Getting Help 6

RWhat is R?Interaction

InfrastructureGetting Help

Conclusion

Why use R?Why avoid R?

Frustration

1 R cannot do everything;

2 R will not hold your hand;

3 The documentation can be opaque;

4 R can drive you crazy, or age you prematurely;

5 The contributed packages have been exposed to varyingdegrees of testing and analysis;

6 R stores objects in RAM;

7 R eschews the GUI.

Andrew Robinson An Introduction to R

Page 7: An Introduction to RR What is R? Interaction Infrastructure Getting Help Conclusion Outline 1 R 2 What is R? Why use R? Why avoid R? 3 Interaction 4 Infrastructure 5 Getting Help 6

RWhat is R?Interaction

InfrastructureGetting Help

Conclusion

Why use R?Why avoid R?

A contrast

1 R is object-oriented;

2 SAS is PROCedure-oriented;

Andrew Robinson An Introduction to R

Page 8: An Introduction to RR What is R? Interaction Infrastructure Getting Help Conclusion Outline 1 R 2 What is R? Why use R? Why avoid R? 3 Interaction 4 Infrastructure 5 Getting Help 6

RWhat is R?Interaction

InfrastructureGetting Help

Conclusion

Talking with R

Interactively.

Write commands at prompt.Use arrows for history.

Batch

Write scripts.Use source()

Andrew Robinson An Introduction to R

Page 9: An Introduction to RR What is R? Interaction Infrastructure Getting Help Conclusion Outline 1 R 2 What is R? Why use R? Why avoid R? 3 Interaction 4 Infrastructure 5 Getting Help 6

RWhat is R?Interaction

InfrastructureGetting Help

Conclusion

Talking with R

Interactively.

Write commands at prompt.Use arrows for history.

Batch

Write scripts.Use source()

Andrew Robinson An Introduction to R

Page 10: An Introduction to RR What is R? Interaction Infrastructure Getting Help Conclusion Outline 1 R 2 What is R? Why use R? Why avoid R? 3 Interaction 4 Infrastructure 5 Getting Help 6

RWhat is R?Interaction

InfrastructureGetting Help

Conclusion

Working Directory

The working directory is the default directory.

Relevant commands

getwd()

setwd()

Andrew Robinson An Introduction to R

Page 11: An Introduction to RR What is R? Interaction Infrastructure Getting Help Conclusion Outline 1 R 2 What is R? Why use R? Why avoid R? 3 Interaction 4 Infrastructure 5 Getting Help 6

RWhat is R?Interaction

InfrastructureGetting Help

Conclusion

Working Directory

The working directory is the default directory.

Relevant commands

getwd()

setwd()

Andrew Robinson An Introduction to R

Page 12: An Introduction to RR What is R? Interaction Infrastructure Getting Help Conclusion Outline 1 R 2 What is R? Why use R? Why avoid R? 3 Interaction 4 Infrastructure 5 Getting Help 6

RWhat is R?Interaction

InfrastructureGetting Help

Conclusion

Workspace

The workspace is the container of all your objects.

Relevant commands

ls()

rm()

rm(list=ls())

save.image()

save()

load()

Andrew Robinson An Introduction to R

Page 13: An Introduction to RR What is R? Interaction Infrastructure Getting Help Conclusion Outline 1 R 2 What is R? Why use R? Why avoid R? 3 Interaction 4 Infrastructure 5 Getting Help 6

RWhat is R?Interaction

InfrastructureGetting Help

Conclusion

Workspace

The workspace is the container of all your objects.

Relevant commands

ls()

rm()

rm(list=ls())

save.image()

save()

load()

Andrew Robinson An Introduction to R

Page 14: An Introduction to RR What is R? Interaction Infrastructure Getting Help Conclusion Outline 1 R 2 What is R? Why use R? Why avoid R? 3 Interaction 4 Infrastructure 5 Getting Help 6

RWhat is R?Interaction

InfrastructureGetting Help

Conclusion

Workspace

The workspace is the container of all your objects.

Relevant commands

ls()

rm()

rm(list=ls())

save.image()

save()

load()

Andrew Robinson An Introduction to R

Page 15: An Introduction to RR What is R? Interaction Infrastructure Getting Help Conclusion Outline 1 R 2 What is R? Why use R? Why avoid R? 3 Interaction 4 Infrastructure 5 Getting Help 6

RWhat is R?Interaction

InfrastructureGetting Help

Conclusion

Workspace

The workspace is the container of all your objects.

Relevant commands

ls()

rm()

rm(list=ls())

save.image()

save()

load()

Andrew Robinson An Introduction to R

Page 16: An Introduction to RR What is R? Interaction Infrastructure Getting Help Conclusion Outline 1 R 2 What is R? Why use R? Why avoid R? 3 Interaction 4 Infrastructure 5 Getting Help 6

RWhat is R?Interaction

InfrastructureGetting Help

Conclusion

Local Help

R comes with internal help. Use the examples.

Relevant commands

help()

?<command>

help.search()

help.start()

Andrew Robinson An Introduction to R

Page 17: An Introduction to RR What is R? Interaction Infrastructure Getting Help Conclusion Outline 1 R 2 What is R? Why use R? Why avoid R? 3 Interaction 4 Infrastructure 5 Getting Help 6

RWhat is R?Interaction

InfrastructureGetting Help

Conclusion

Local Help

R comes with internal help. Use the examples.

Relevant commands

help()

?<command>

help.search()

help.start()

Andrew Robinson An Introduction to R

Page 18: An Introduction to RR What is R? Interaction Infrastructure Getting Help Conclusion Outline 1 R 2 What is R? Why use R? Why avoid R? 3 Interaction 4 Infrastructure 5 Getting Help 6

RWhat is R?Interaction

InfrastructureGetting Help

Conclusion

Local Help

R comes with internal help. Use the examples.

Relevant commands

help()

?<command>

help.search()

help.start()

Andrew Robinson An Introduction to R

Page 19: An Introduction to RR What is R? Interaction Infrastructure Getting Help Conclusion Outline 1 R 2 What is R? Why use R? Why avoid R? 3 Interaction 4 Infrastructure 5 Getting Help 6

RWhat is R?Interaction

InfrastructureGetting Help

Conclusion

Remote Help

The Internet is a vast repository of advice. Most of it is good.

Relevant commands

RSiteSearch()

Google

R-help . . .

Andrew Robinson An Introduction to R

Page 20: An Introduction to RR What is R? Interaction Infrastructure Getting Help Conclusion Outline 1 R 2 What is R? Why use R? Why avoid R? 3 Interaction 4 Infrastructure 5 Getting Help 6

RWhat is R?Interaction

InfrastructureGetting Help

Conclusion

Remote Help

The Internet is a vast repository of advice. Most of it is good.

Relevant commands

RSiteSearch()

Google

R-help . . .

Andrew Robinson An Introduction to R

Page 21: An Introduction to RR What is R? Interaction Infrastructure Getting Help Conclusion Outline 1 R 2 What is R? Why use R? Why avoid R? 3 Interaction 4 Infrastructure 5 Getting Help 6

RWhat is R?Interaction

InfrastructureGetting Help

Conclusion

Responsive Help

A list-server exists. Information is available at:https://stat.ethz.ch/mailman/listinfo/r-help

Relevant issues

Post questions as a last resort.

http://www.r-project.org/posting-guide.html

Andrew Robinson An Introduction to R

Page 22: An Introduction to RR What is R? Interaction Infrastructure Getting Help Conclusion Outline 1 R 2 What is R? Why use R? Why avoid R? 3 Interaction 4 Infrastructure 5 Getting Help 6

RWhat is R?Interaction

InfrastructureGetting Help

Conclusion

Responsive Help

A list-server exists. Information is available at:https://stat.ethz.ch/mailman/listinfo/r-help

Relevant issues

Post questions as a last resort.

http://www.r-project.org/posting-guide.html

Andrew Robinson An Introduction to R

Page 23: An Introduction to RR What is R? Interaction Infrastructure Getting Help Conclusion Outline 1 R 2 What is R? Why use R? Why avoid R? 3 Interaction 4 Infrastructure 5 Getting Help 6

RWhat is R?Interaction

InfrastructureGetting Help

Conclusion

R is hard work

Work hard!

That means:

Read widely.

Use the resources available.

Experiment patiently and flexibly.

Keep scripts.

Comment generously.

Andrew Robinson An Introduction to R

Page 24: An Introduction to RR What is R? Interaction Infrastructure Getting Help Conclusion Outline 1 R 2 What is R? Why use R? Why avoid R? 3 Interaction 4 Infrastructure 5 Getting Help 6

RWhat is R?Interaction

InfrastructureGetting Help

Conclusion

R is hard work

Work hard!

That means:

Read widely.

Use the resources available.

Experiment patiently and flexibly.

Keep scripts.

Comment generously.

Andrew Robinson An Introduction to R


Recommended