Question: Before creating the final tibble, we will first develop a method that can read a file that contains code. Create a function called fRead _
Before creating the final tibble, we will first develop a method that can read a file that contains code.
Create a function called fReadcode with a single argument filepath The argument filepath is
used to specify the path to the file that should be read. The function fReadcode should:
use the function readlines from the package readr to read the file at the location specified by
the value passed to the filepath argument,
remove any characters from a line that follows the comment # symbol,
remove any trailing white spaces from a line,
remove any empty lines and
join all the lines into a single string using the newline character ie
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
