Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 fRead_code with a single argument file_path . The argument file_path is
used to specify the path to the file that should be read. The function fRead_code should:
use the function read_lines from the package readr to read the file at the location specified by
the value passed to the file_path 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 i.e.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

9th Edition

0135188148, 978-0135188149, 9781642087611

More Books

Students also viewed these Databases questions

Question

What is the most important part of any HCM Project Map and why?

Answered: 1 week ago