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

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

expert
Victor BarbeauuLaw
(5/5)

553 Answers

Hire Me
expert
Martinha RosaFinance
(5/5)

609 Answers

Hire Me
expert
Yvonne DuffNursing
(5/5)

649 Answers

Hire Me
expert
Laura LeighlandMathematics
(/5)

877 Answers

Hire Me
Mathematics
(5/5)

Define a character vector a that has these strings on it “Hello”, “Goodbye”, “Goodnight”, “Bye”:

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Create a variable z that has value 32 Indented block

z <-32

z 32

Create a variable w that is equal to z/3

w <- z/3 w

10.6666666666667

Define a character vector a that has these strings on it “Hello”, “Goodbye”, “Goodnight”, “Bye”:

myStrings<- c(“Hello”, “Goodbye”, “Goodnight”, “Bye”)

Error in parse(text = x, srcfile = src): <text>:1:15: unexpected input 1: myStrings<- c(“

Traceback:

Define a vector variable q that has 3,-3,2,-1,0,-4,-6,3,-7,4,2,3,-2,-4,4 on it.

q<-(3,-3,2,-1,0,-4,-6,3,-7,4,2,3,-2,-4,4)

Next create a data frame for this data:

Name  GPA  Major   Phone 

Alexa   3.7    FBM      2123982375

Tanya   3.6  AMC       212 323 3040

Hubert 3.4  FBM        718 232 9392

create a dataframe for this data 

Name<- ("Alexa","Tanya","Hubert")

GPA<-(3.7,3.6,3.4)

Major<-"FBM","AMC","FBM"

Phone<-("212 398 2375","212 323 3040","718 232 9392")

df <- data.frame (Name,GPA,Major,Phone)

Print out the structure of your data frame using str

str (df)function (x, df1, df2, ncp, log = FALSE)Print out just the GPA column using $ sign: (Replace CODE below with the right column name for this.

Print (df$)

Error in parse(text = x, srcfile = src): <text>:1:11: unexpected ')' 1: Print (df$)

Traceback:

Now print out the first few lines of the data frame using head

CODE

Use summary(df) to print out a summary of the data frame data:

CODE

Delete the column “Major” from the data frame:

CODE

Print out the structure of your data frame showing the column above removed:

CODE

finally add a column called “ID” Your data frame will look like this after doing this:

name     GPA          Phone              ID

Alexa       3.7      212 398 2375   1001

Text Box: Name GPA Phone ID

Tanya 3.6 212 323 3040 1002

Hubert 3.4 718 232 9392 1003

add a column called “ID”

df$ID <- CODE

Print out the structure of the new data frame using str :

CODE

Change Tanyas GPA in the dataframe to be 3.98

df[2,2] <- CODE

Print out the data frame using head to make sure her GPA is changed:

CODE

(5/5)
Attachments:

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