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 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...
(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...
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...
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...
State which type of measurement scale each represents, and then which center measures can be use...
State which type of measurement scale each represents, and then which center measures can be use for the variable? A.) You collect data on the height of plants using a new fertilizer. B.) You collect data on the cars that people drive in Campbelltown, Australia. C.) You collect data on the temperature at different locations in Antarctica. D,) You collect data on the first, second, and third winner in a beer competition.
which data base type may be identified based on the connection between common attributes in separate...
which data base type may be identified based on the connection between common attributes in separate tables, each containing different types of information? a) analytical database b) relational database c)hierarchical database d)object-oriented database
CAN YOU PLEASE WRITE THIS CODE IN A DIFFERENT WAY 'EASIER AND BETTER' QUESTION Using C++...
CAN YOU PLEASE WRITE THIS CODE IN A DIFFERENT WAY 'EASIER AND BETTER' QUESTION Using C++ 11. Write a function that will merge the contents of two sorted (ascending order) arrays of type double values, storing the result in an array out- put parameter (still in ascending order). The function shouldn’t assume that both its input parameter arrays are the same length but can assume First array 04 Second array Result array that one array doesn’t contain two copies of...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT