Question

Which type of R object can be used to store data that contain a factor variable...

Which type of R object can be used to store data that contain a factor variable and a numerical variable with different lengths?

A) data frame B) list C) matrix D) array

Which of the following function is not for importing data in R?
A) read.table( ) B) scan( ) C) read.csv( ) D) write.table( )

Homework Answers

Answer #1

1) For this part I'll write the type of data each vector can contain:

Vector: Here all elements must be of the same type.

Matrix: It is a special kind of vector. It is a vector with two more attributes namely the number of rows columns.

Array: It is similar to the matrix but can more dimensions.

List:: The cost Iist can contain elements of different types.,

Data frame: A data frame is used for storing data tables. It is a list of vectors of equal length.

Thus the answer is: B) list

2) A) read.table( ) reads a file in table format and creates a data frame from it.

B) Scan(): Read or scans data into a vector or list from the console or file

C) read.csv( ): Read data from a csv file.

D) write.table(): prints its required argument from a data frame.

Thus the answer is D)write.table()

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
1. Which of the following functions in R can be used to inspect data object? Select...
1. Which of the following functions in R can be used to inspect data object? Select all that apply. rm glimpse() head() plot 2. To get an overview of your data, one can use the function: ls() args() summary() list() 5. Numerical summaries/characteristics of the population are called parameters. True False
In the following C code, Which variable if NOT of primitive data type? A. a B....
In the following C code, Which variable if NOT of primitive data type? A. a B. b C. c D. d int a = 10; double b = 20.0; float c = false; char d[5] = "Hello"; // here we define a string In programming language C, the implementation of a string data type is limited dynamic length, which means the length of a string variable is fixed once it has been defined. A. True B. False In C# programming...
In the short run, a particular type of skilled labor is the only variable factor used...
In the short run, a particular type of skilled labor is the only variable factor used by a firm. The manager of the firm has estimated that the marginal product of labor is given by MPL = A / (√L), where A is a number to be specified below (and √ represents the square root). The hourly wage is w, and each unit of output can be sold in a competitive market at a market price P. If w =...
using python 2.: "Which of the following statements is ``WRONG`` about Object? <br>\n", "(A) An object...
using python 2.: "Which of the following statements is ``WRONG`` about Object? <br>\n", "(A) An object has an id, which can be obtained by using the function ``id`` <br>\n", "(B) An object has a type, which can be obtained by using the function ``type``<br>\n", "(C) int numbers (type: int, e.g., 10) in Python are not objects <br>\n", "(D) The id of an object is unique during the lifetime of the object"
using r (include all code and packages used) Generate 25 variables, each of which consists of...
using r (include all code and packages used) Generate 25 variables, each of which consists of 25 random samples from a standard normal. Store these variables in a data frame – call it df.train – and randomly select one variable to be the response – rename it y. (The end result should be a data frame with 25 observations on 25 variables but with no relationships between any of the variables.) Repeat step (a) to create a test set called...
Write in C++. Define a class called Text whose objects store lists of words. The class...
Write in C++. Define a class called Text whose objects store lists of words. The class Text will be just like the class StringVar except that the class Text will use a dy- namic array with base type StringVar rather than base type char and will mark the end of the array with a StringVar object consisting of a single blank, rather than using '\0' as the end marker. Intuitively, an object of the class Text represents some text consisting...
(Use the R studio to find the answer.) 5. Consider the Batting data frame from the...
(Use the R studio to find the answer.) 5. Consider the Batting data frame from the Lahman library. a) How many observations and how many variables does Batting contain? (b) Use filter from the dplyr library to make a new data frame with just the information from yearID 2015. How many observations does this contain? (c) Who had the most Bases on Balls (BB) in 2015? (You can just give the player ID) (d) How many players had more than...
Part 1 For a set of two-variable data, the correlation r can be used to assess:...
Part 1 For a set of two-variable data, the correlation r can be used to assess: Group of answer choices both the direction and the stength. the strength only. the direction only. the form/shape only. Part 2 The correlation r has: Group of answer choices the same units as the response variable y. no units. the same units as x times y. the same units as the explanatory variable x. Part 3 The correlation between two variables will be closer...
Which one of the following situations does NOT have a retain cycle? Object 1 of struct...
Which one of the following situations does NOT have a retain cycle? Object 1 of struct A is assigned to a member of Object 2 of struct B, while Object 2 of struct B is assigned to a member of Object 1 of struct A. Object 1 of class A is assigned to a member of Object 2 of class A, while Object 2 of class A is assigned to a member of Object 1 of class A. Object 1...
"### Question 1\n",     "Which of the following statements is ``WRONG`` about Variable? <br>\n",     "(A)...
"### Question 1\n",     "Which of the following statements is ``WRONG`` about Variable? <br>\n",     "(A) A variable is used as a name (i.e. identifier) of an object. So we can say a variable refers to an object <br>\n",     "(B) A variable is 'attached' to an object in an assignment statement, and it can be detached by `del` <br>\n",     "(C) A variable can refer to more than one object at the same time (i.e. two different objects can...