1. Engineering
  2. Computer Science
  3. source on save run source 63 double...

Question: source on save run source 63 double...

Question details

Source on Save Run Source- 63 double <- function(value) 64 return(value * value) 65 67 # Using your double() function, create a variable minutes-in-two-days, 68 # which is the number of minutes in two days 69 minutes_in two_days <- doubleO 70 71 # Write a function cube。、 that takes in a value and returns that value cubed 72 73 74 # Create a variable . twenty-seven by passing 3 to your . cube() function 75 76 77, # Vectors 78 79 # Create a vector 、movies that contains the names of six movies you like 80 81 82 # Create a vector top-three. that only contains the first three movies 83 # You should do this by subsetting the vector, not by simply retyping the movies 84 85 86 # Using your vector and the paste(), method, create a vector , excited, that # adds the phrase- is a great movie. to the end of each element . movies 89 90 # Create a vector without-four, by omitting the fourth element from movies. 91 # Again, do this by subsetting the vector, not by simply retyping the movies 1471 Challenge R Scrip Console Terminalassignment.KX ND-README·md C Envir Source on Save 91 # Again, do this by subsetting the vector, not by simply retyping the movies Glo 92 93 94 # Create a vector numbers, that is the numbers 700 through 999 mor 95 my 96 97 # Using the built in length(), function, create a variable 、len, that is my ocC qui 98 # equal to the length of your vector numbers 100 101 # Using the mean(), function, create a variable numbers.mean, that is 102 # equal to the mean of your vector numbers 103 104 105 # Using the median() function, create a variable numbers-median 106 # that is the median of your vector numbers 107 108 109 # Create a vector lower-numbers, that is the numbers 500:699 110 Files Ne 112 # Create a vector、a11-numbers, that combines lower-numbers、and numbers. 113 114 115, # Dates . 116 117 # Use the as. Date() function to create a variable today, storing todays date 118 # Make sure to use R to get the *current date* 119 # 120 See https://stat.ethz.ch/R-manual /R-devel/library/base/htmL/Sys.t ime.html 147:1 Challenge R Script- Console Terminal122 # Create a variable summer-break, that represents the first day of summer break 123 # (June 14, 2019). Make sure to use the 、as. Date function again 124 125 126 # Create a variable days-to-break, that is how many days until break 127 # Hint: subtract the dates! 128 129 130 # Define a function make-birthday-intro() that takes in three arguments: 131 # a name, an age, and a character string for your next (upcoming) birthday 132 # This method should return a character string of the format: 133 # Hello, my name is {name, and Im {age} years old 134 # In {N} days Ill be {new-age]. 135 # You must utilize your make-introduction() function from Part 1, 136 # and compute {N} and {new-age} in your function 137 138 139 # Create a variable my-bday-intro, using the make-birthday-intro() function, 140 # passing in .my-name. .my-age., and your upcoming birthday. 141 142 143, # Challenge 144 # Write a function remove-digits. that wiiï remove all digits 145 # (ie., 0 through 9) from aïï elements in a *vector of strings* 146 147 148 # Demonstrate that your approach is successful by passing a vector of courses 149 # to your function. For example, remove-digits(c(INFO 201, CSE 142)) 150 R Script 147:1Challenge Console Terminal

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution