logo Hurry, Grab up to 30% discount on the entire course
Order Now logo
602 Times Downloaded

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Neha SharmaOthers
(5/5)

893 Answers

Hire Me
expert
Ashok MalhotraComputer science
(5/5)

704 Answers

Hire Me
expert
Garard BerwickBusiness
(5/5)

970 Answers

Hire Me
expert
Juber KhanCriminology
(5/5)

841 Answers

Hire Me
MS Office
(5/5)

create a numeric vector called y that contains the numbers 2 thru 2931.

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Create code for these instructions using the Excel file.

Save it in:

1. Word Format

2. Knitted HTML

3. Knitted PDF

# square three times four

 

# create a new variable called x that is blank

# create a numeric vector called y that contains the numbers 2 thru 2931.

# create a numeric vector called z that is a sequence starting from 1 thru 1000 that increments by 3.

# create a character vector called 'myBuds' that contains names 'Cavin', 'Judy', and 'Kai Wei'. 'Cavin should be repeated 5 fives. Also have the output print when we do the assignment.

# how many factor levels does the myBuds character vector have?

#None, because its not a factor vector

# coerce the myBuds vector to a factor vector by overwritting it.

# write a statement that would tell you how many total characters the myBuds vector has. Hint: work from the inside out.

# create a Date vector called 'today' that has today's date. If this date was converted to a number in R, what would it be?

# create a logical vector called 'a' that has 34 TRUE values and 300 FALSE values.

# write a statement that tests if the length of vector 'a' is the same as vector 'z'.

 

# What is the sum of vector a multiplied by vector z?

# What would happen if you added vector y and vector z? Would it work, why or why not?

# use the any() function to see if vector z contains the value 100.

# set variable z to NULL. Did this delete variable z?

# what statement would delete variable z from your environment

# what data structure type is 'd'?

# how could you find the names of all the columns in your dataset?

# if 'd' was a matrix type, would names(d) provide you the correct column names?

# what statement would give you the dimensionality of 'd'?

# what statement would give you the number of columns in 'd'?

# what statement would provide you the data structure type, column vector types, and dimensionality all in one?

# print the invoice_number column.

# print the first three rows of your dataset 'd'.

# select rows 1 thru 10 for colums vendor_id and invoice_number.

# what 'is' function asks if the 'terms_id' column is an integer vector?

# coerce the terms_id column to a numeric vector type.

# What'is' function asks if the 'terms_id' column is a numeric vector?

# create a new data.frame called 'd2' that has columns 'vendor_id', 'invoice_total',

# and payment_total' columns in it from 'd'.

# coerce the 'vendor_id' column in the d2 data.frame to a factor vector.

 

# In the d2 data.frame, change the payment_total and invoice_total values in the second row to 400.20 instead of 40.20.

# create a vector called 'dummies' using the model.matrix function where the columns are dummy variables for 'vendor_id' in 'd2'.

# create a new data.frame called 'd3' that contains 'd2' and 'dummies'

# create a list called 'recs' that contains vendor_id vector from 'd3' in the first element and vector 'a' in the second element

# assign names to the two elements in your 'recs' list

# access the last value in your first element of your 'recs' list.

# create an empty data.frame called 'results' that has 100 rows and 4 columns

# set the column names for 'results' to the following: model, vars, accuracy, runtime.

# load the library data.table (first install it if its not installed)

# coerce data.frame 'd' to a data.table called 'd'

# use the str() to confirm 'd' is a data.table

# set a data.table key on the column invoice_id in 'd'. Then show that there is indeed a key on that field.

# remove all the objects in your environment

 

(5/5)
Attachments:

Expert's Answer

602 Times Downloaded

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme