Question: The data provided on SUNLearn is in a folder named Scripts . Multiple programming scripts were downloaded from GitHub. However, as life would have it

The data provided on SUNLearn is in a folder named Scripts . Multiple programming scripts were
downloaded from GitHub. However, as life would have it, there are some other files in the folder that do not
contain the target coding languages we are looking for.
As a first step, you need to develop a function that stores the names of all the files inside the folder
Scripts in a list. Create a function named fGet_files with a single argument file_folder . The
argument file_folder is used to specify the name of the folder that contains the data i.e. "Scripts" .
The function fGet_files should return a list where:
the list only includes R and Python files. R files have the extension .r or .R , while Python
files end with .py
the length of the list should be equal to the total number of R and Python files inside the
Scripts folder
each element of the list should store the file name as a string.
Finally, assign an object named list_files to the output from the fGet_files function.
Provide your answer in the code chunk get_files : I would like to clarify , the work done on my data science course cover dplyr, Lubridate, stringR, ggplot2, Tidyverse, and tidy models the question I ask should be explained and broken down using functions and packages from these ecosystem. The code must also pass this test if (length(fGet_files("Scripts"))!=549)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!