R Programming terms basic

R Programming terms basic

memorize.aimemorize.ai (lvl 286)
Section 1

Preview this deck

args(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)

args(function name)

Front

Shows the arguments for a function.

Back

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

Front

Excludes them

Back

x<- 1:20

Front

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

Back

<-

Front

Assignment operator.

Back

any ()

Front

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

Back

mean (x)

Front

Function that calculates the mean

Back

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

Front

R converts the number to a string.

Back

log(w)

Front

returns the log of each element within vector w

Back

ls()

Front

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

Back

rm(x, y)

Front

remove objects (x and y)

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

rm()

Front

Removes variables and functions and their structure.

Back

cat

Front

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

Back

?

Front

Shortcut to the help command.

Back

c(...)

Front

Operator used to create a vector.

Back

vec [x:y]

Front

selects elements x through y of vector vec.

Back

example(function name)

Front

provides an example of a function

Back

vec[c(w,y,z)]

Front

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

Back

vec [x]

Front

selects xth element of vector vec.

Back

??keyword

Front

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

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

help(function name)

Front

Displays the documentation for a function

Back

vignette("vignettename")

Front

View a particular vignette

Back

vignette(package="package name")

Front

View the vignette for a particular package.

Back

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

Front

logical values

Back

help(package="packagename")

Front

Displays information on a particular package.

Back

help.search("keyword")

Front

Performs a keyword search of the R documentation.

Back

Task views

Front

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

Back

_____ tells R to ignore NA values

Front

na.rm=TRUE

Back

x <- rnorm(50)

Front

store 50 numbers with normal distribution in x

Back

ctrl- c

Front

Interrupt R without terminating it

Back

ls.str()

Front

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

Back

____ causes functions to return NA or even halt altogether.

Front

NA values in vector argument

Back

cov (x,y)

Front

Function that calculates the covariance between two vectors

Back

all ()

Front

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

Back

/n

Front

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

Back

vignettes

Front

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

Back

sd (x)

Front

Function that calculates the standard deviation.

Back

{ }

Front

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

Back

RSiteSearch("keyword")

Front

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

Back

var (x)

Front

Function that calculates the variance.

Back

help(solve)

Front

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

Back

function to create a series of repeated values.

Front

rep(x, times=y)

Back

ls()

Front

Show what variables have been defined in the workspace

Back

sqrt(w)

Front

returns the square root of each elements within vector w

Back

q()

Front

quit the R program

Back

help.start()

Front

view R documentation table of contents.

Back

n:m

Front

expression which creates a simple n+1 sequence

Back

vignette()

Front

See a list of all vignettes on your computer.

Back

Section 2

(34 cards)

sum(x)

Front

__ summation of all vectors in x

Back

help("[[")

Front

get more information about special characters [[

Back

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

Front

N

Back

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

Front

__ returns a sorted list of x in increasing order

Back

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

Front

Save objects to a file in binary format. OS independent

Back

load("myData.RData")

Front

Load objects from files.

Back

min(x)

Front

__ calculates the sample minimum of x

Back

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

Front

Load data from ASCII file

Back

_ starts a comment

Front

#

Back

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

Front

y<- c(x, 0, x)

Back

length(x)

Front

__ returns the number of elements in x

Back

y<-rep(x, each=5)

Front

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

Back

source("commands.R")

Front

running commands from the external file commands.R

Back

._ extension for external file storing R language code

Front

R

Back

readHTMLTable(url,which=3)

Front

Read data from html tables.

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

sink("record.lis")

Front

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

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

mean(x)

Front

__ calculates the sample mean of 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

sink()

Front

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

Back

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

Front

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

Back

??solve

Front

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

Back

seq()

Front

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

Back

y<- rep(x, times=5)

Front

__ put 5 copies of x into y

Back

2*5:1

Front

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

Back

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

Front

Save data in ASCII format

Back

var(x)

Front

__ returns the sample variance of x

Back

example(topic)

Front

run an example on a help topic.

Back

seq(10, 2, by=2)

Front

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

Back

Is R case sensitive? (Y/N)

Front

Y

Back

range(x)

Front

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

Back

prod(x)

Front

__ returns the product of all of the elements in x

Back

_ separates multiple commands on one line

Front

;

Back