R questions Flashcards

1
Q

what is R

A

R is data analysis software which is used by analysts, quants, statisticians, data scientists and others.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

List out some of the function that R provides?

A

The function that R provides are

Mean
Median
Distribution
Covariance
Regression
Non-linear
Mixed Effects
GLM
GAM. etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Explain how you can start the R commander GUI?

A

Typing the command, (“Rcmdr”) into the R console starts the R commander GUI.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

In R how you can import Data?

A

You use R commander to import Data in R, and there are three ways through which you can enter data into it

You can enter data directly via Data
 New Data Set
Import data from a plain text (ASCII) or other files (SPSS, Minitab, etc.)
Read a data set either by typing the name of the data set or selecting the data set in the dialog box

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Mention what does not ‘R’ language do?

A

Though R programming can easily connects to DBMS is not a database
R does not consist of any graphical user interface
Though it connects to Excel/Microsoft Office easily, R language does not provide any spreadsheet view of data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Explain how R commands are written?

A

In R, anywhere in the program you have to preface the line of code with a #sign, for example

subtraction
# division
# note order of operations exists

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How can you save your data in R?

A

To save data in R, there are many ways, but the easiest way of doing this is

Go to Data > Active Data Set > Export Active Data Set and a dialogue box will appear, when you click ok the dialogue box let you save your data in the usual way.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Mention how you can produce co-relations and covariances?

A

You can produce co-relations by the cor () function to produce co-relations and cov () function to produce covariances.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Explain what is t-tests in R?

A

In R, the t.test () function produces a variety of t-tests. T-test is the most common test in statistics and used to determine whether the means of two groups are equal to each other

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Explain what is With () and By () function in R is used for?

A

With() function is similar to DATA in SAS, it apply an expression to a dataset.
BY() function applies a function to each level of factors. It is similar to BY processing in SAS.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the data structures in R that is used to perform statistical analyses and create graphs?

A

R has data structures like

Vectors
Matrices
Arrays
Data frames

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Explain general format of Matrices in R?

A

General format is

Mymatrix< - matrix (vector, nrow=r , ncol=c , byrow=FALSE,
dimnames = list ( char_vector_ rowname, char_vector_colnames))

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

In R how missing values are represented ?

A

In R missing values are represented by NA (Not Available), why impossible values are represented by the symbol NaN (not a number).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Explain what is transpose?

A

For re-shaping data before, analysis R provides various method and transpose are the simplest method of reshaping a dataset. To transpose a matrix or a data frame t () function is used.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Explain how data is aggregated in R?

A

By collapsing data in R by using one or more BY variables, it becomes easy. When using the aggregate() function the BY variable should be in the list.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the function used for adding datasets in R?

A

rbind function can be used to join two data frames (datasets). The two data frames must have the same variables, but they do not have to be in the same order.

17
Q

What is the use of subset() function and sample() function in R ?

A

In R, subset() functions help you to select variables and observations while through sample() function you can choose a random sample of size n from a dataset.

18
Q

Explain how you can create a table in R without external file?

A

Use the code

myTable = data.frame()
edit(myTable)
This code will open an excel like spreadsheet where you can easily enter your data.