Section 1

Preview this deck

help(function name)

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (84)

Section 1

(50 cards)

help(function name)

Front

Displays the documentation for a function

Back

What happens if you try to include both numbers and strings in a vector?

Front

R converts the number to a string.

Back

mean (x)

Front

Function that calculates the mean

Back

any ()

Front

function that tests any element of a vector is TRUE in comparison.

Back

n:m

Front

expression which creates a simple n+1 sequence

Back

Task views

Front

where to find out what packages may be useful for a given situation.

Back

c(...)

Front

Operator used to create a vector.

Back

cat

Front

An alternative to the print function that let's you combine multiple items Into a continuous output.

Back

??keyword

Front

Shortcut for keyword search of documentation. Does not use quotation marks.

Back

/n

Front

New line character. Used with the cat function for example.

Back

vec [x:y]

Front

selects elements x through y of vector vec.

Back

ctrl- c

Front

Interrupt R without terminating it

Back

help.start()

Front

view R documentation table of contents.

Back

<-

Front

Assignment operator.

Back

x <- rnorm(50)

Front

store 50 numbers with normal distribution in x

Back

what does R do with negative indexes such as [-1] ?

Front

Excludes them

Back

RSiteSearch("keyword")

Front

Search the R site and mailing list for information without leaving R.

Back

_____ tells R to ignore NA values

Front

na.rm=TRUE

Back

help(solve)

Front

get more information about the function "solve". An alternative command ?solve

Back

help(package="packagename")

Front

Displays information on a particular package.

Back

log(w)

Front

returns the log of each element within vector w

Back

all ()

Front

function that tests if all elements of a vector is TRUE in comparison.

Back

vec[c(w,y,z)]

Front

selects non-sequential elements w,y,z from within vector vec.

Back

rm()

Front

Removes variables and functions and their structure.

Back

q()

Front

quit the R program

Back

cor (x,y)

Front

Function that calculates the correlation between two vectors.

Back

plot(x, y)

Front

plot points on a plane from set x and y

Back

____ causes functions to return NA or even halt altogether.

Front

NA values in vector argument

Back

help.search("keyword")

Front

Performs a keyword search of the R documentation.

Back

sd (x)

Front

Function that calculates the standard deviation.

Back

ls()

Front

Show what variables have been defined in the workspace

Back

boolean values TRUE and FALSE are called ___________ ________ in R.

Front

logical values

Back

function to create a series of repeated values.

Front

rep(x, times=y)

Back

ls()

Front

Shows those R objects which are in current R workspace . Alt command: objects()

Back

?

Front

Shortcut to the help command.

Back

example(function name)

Front

provides an example of a function

Back

vignettes

Front

Additional documentation such as introductions, tutorials, or refererence cards that are installed on your computer when you install a package.

Back

____ function to create a sequence (a to b) with an increment other than 1 (c).

Front

seq (from=a, to=b, by=c)

Back

vec [x]

Front

selects xth element of vector vec.

Back

vignette("vignettename")

Front

View a particular vignette

Back

rm(x, y)

Front

remove objects (x and y)

Back

args(function name)

Front

Shows the arguments for a function.

Back

vignette()

Front

See a list of all vignettes on your computer.

Back

{ }

Front

delimits the start and end of the body of a multi-line function

Back

cov (x,y)

Front

Function that calculates the covariance between two vectors

Back

var (x)

Front

Function that calculates the variance.

Back

vignette(package="package name")

Front

View the vignette for a particular package.

Back

sqrt(w)

Front

returns the square root of each elements within vector w

Back

ls.str()

Front

Show variables and their structure that have been defined in the workspace.

Back

x<- 1:20

Front

make sequence x=(1,2,..., 20)

Back

Section 2

(34 cards)

example(topic)

Front

run an example on a help topic.

Back

dput(myData, file="myData.txt")

Front

Save data in ASCII format

Back

prod(x)

Front

__ returns the product of all of the elements in x

Back

source("commands.R")

Front

running commands from the external file commands.R

Back

store the following in y a set called x, 0, then the same set called x

Front

y<- c(x, 0, x)

Back

sort(x)alt: order() sort.list()

Front

__ returns a sorted list of x in increasing order

Back

pmax(x,y)

Front

__ returns a parallel maximum, a vector containing in each element the largest element of that position in any of the input vectors

Back

._ extension on an external file storing commands

Front

R

Back

seq()

Front

__ alt to the colon, five parameters but if only two are given the same as colon command.

Back

min(x)

Front

__ calculates the sample minimum of x

Back

_ starts a comment

Front

#

Back

help("[[")

Front

get more information about special characters [[

Back

sink()

Front

when output is being diverted to an external file, this command returns it to the console again.

Back

2*5:1

Front

__ generate 10 to 2 by 2's using a colon; [1] 10 8 6 4 2

Back

length(x)

Front

__ returns the number of elements in x

Back

save(myData, file="myData.RData")

Front

Save objects to a file in binary format. OS independent

Back

readHTMLTable(url,which=3)

Front

Read data from html tables.

Back

??solve

Front

alt to help.search(), find details and more examples about the function solve.

Back

load("myData.RData")

Front

Load objects from files.

Back

Is R case sensitive? (Y/N)

Front

Y

Back

sink("record.lis")

Front

divert all subsequent output from the console to an external file record.lis

Back

y<-rep(x, each=5)

Front

__ put 5 copies of each element next to each other of x into y

Back

create a data structure named x with the vectors 1.1, 2.2, 3.3

Front

x <- c(1.1, 2.2, 3.3)

Back

var(x)

Front

__ returns the sample variance of x

Back

y<- rep(x, times=5)

Front

__ put 5 copies of x into y

Back

sum(x)

Front

__ summation of all vectors in x

Back

seq(10, 2, by=2)

Front

__ generate 10 to 2 by 2's without using a colon

Back

mean(x)

Front

__ calculates the sample mean of x

Back

_ separates multiple commands on one line

Front

;

Back

alternative way of assigning an object x the vectors 1,2,3

Front

assign("x", c(1,2,3))

Back

dump("myData", file="myData.txt")

Front

Load data from ASCII file

Back

range(x)

Front

__ returns a vector of length 2 min(x), max(x))

Back

pmin(x,y)

Front

parallel minimum, a vector containing in each element the smallest element of that position in any of the input vectors; pmin(5:1, pi) [1] 3.14 3.14 3.0 2.0 1.0

Back

Do vectors need to be the same length for vector arithmetic? (Y/N)

Front

N

Back