Sources, Credit and Appendix of Commands
Many Thanks…
Without the reference and insight of several key contributors/sources this short guide would not be possible.
My sincere thanks go out to all those who have contributed by sharing their experiences, advice and insight into this great tool, R!!
Important sources include:
Quick R
Revolutions
Using R
Rtips Revival 2012!
R Tutorials: Carolina Coastal University
A special thanks to Kelly O'Day at Climate Charts and Graphs. From which specific inspiration and large parts of the implementation of Chapter 7 were originally derived.
Appendix of Commands
Some commands used within this module are include here, in alphabetical order.
Each with a brief description and the arguments required.
abline(h=15,col=“red”,lty=“3”) - add a horizontal line
apropos(“plot”) - list all functions with 'plot' in title
c(i,ii,iii) - concatenate a vector - i can be numeric, character or LOGICAL
cwd() - show the current working directory
dim(my.array) <-c(x,y) - assign my.array dimensions of x and y
getwd() - get current working directory
head(my.data) - show first rows of object my.data
hist(new.data$temp) - histogram of new.data, column 'temp'
history() - display last 25 commands
length(my.vector) - show length of my.vector
load(file=“some.data.Rdata”) - load workspace objects
load.history(file=“myfile”) - load command history
ls() - list all objects in the workspace
mean(my.vector) - calculate sum of my.vector
nrow(x) - show no of rows in array x
ncol(X) - show no of cols in array x
numeric(x) - create numeric vector of length x
par(new=T) - set overplotting to on, use after plot() command
par(new=F) - set overplotting to off
plot(one,two) - simple x.y plot of object one and two
points(mydata_x,mydata_y,col=“red”) - add points to a xy plot
read.table(“mydata.csv”,sep=“,”,header=T) - load csv file, with header and sep “,”
rep(i:ii,iii) - replicate vector seq i:ii, iii times
save.history(file=“myfile”) - save command history
save.image() - save all workspace objects to file .Rdata
scan(mytextfile.ascii) - scan in .ascii file one item at a time
scan(mytextfile.txt) - scan in .txt file one item at a time
sd(my.vector) - calculate std dev of my.vector
seq(i,ii,by=iii) - create a vector from i to ii, by iii
str(my.object) - list attributes of object my.object
sum(my.vector) - calculate sum of my.vector
tail(my.data) - show last rows of object my.data
text(x,y,“my.message”“) - add text plot at pos x and y, text in ”“










