From 3cc227149ae09a94e9c29d4bec765a66962cf969 Mon Sep 17 00:00:00 2001 From: Isaiah Murrell-Thomas Date: Tue, 1 Nov 2022 13:04:41 -0400 Subject: [PATCH] Ready for Submission --- MurrellThomas_Exercise7.R | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 MurrellThomas_Exercise7.R diff --git a/MurrellThomas_Exercise7.R b/MurrellThomas_Exercise7.R new file mode 100644 index 0000000..cde4b16 --- /dev/null +++ b/MurrellThomas_Exercise7.R @@ -0,0 +1,21 @@ +# Author: Isaiah Murrell-Thomas + +# Problem 1 +# need to read the given .csv file and store it as a variable +myfile=read.csv("iris.csv", header=TRUE, sep="\t") +# need to use write.table to make it a .txt file and use sep="\t" +write.table(myfile, file="iris.txt", header=TRUE, sep="\t") + +# Problem 2: This part of the script will answer the second part of exercise 7 +# a. A Vector of length 10 containing 100,200,...1000 +vec1=(seq(from=100, to=1000, length=10)) +# b. A two-row, two-column data frame with the team names and final score from last week's ND football game +df1=data.frame(x=c("Notre Dame",44),y=c("UNLV",21)) +# c. The Number 999 +num1=99 +# d. A 10-row 5-column matrix containing integers from 1 to 50 +matrix1=matrix(1:50, nrow=10, ncol=5) +# e. A vector containing three letters +vec2=letters[1:3] +# list creation +list1=list(vec1,df1,num1,matrix1,vec2) \ No newline at end of file