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
CS 340 Milestone One Guidelines and Rubric Overview: For this assignment, you will implement the fundamental operations of create, read, update,
Retail Transaction Programming Project Project Requirements: Develop a program to emulate a purchase transaction at a retail store. This
7COM1028 Secure Systems Programming Referral Coursework: Secure
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
CS 340 Final Project Guidelines and Rubric Overview The final project will encompass developing a web service using a software stack and impleme