Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Episode 4 and 5: Function Error #456

Open
MichaelBAnderson opened this issue Oct 29, 2019 · 1 comment
Open

Episode 4 and 5: Function Error #456

MichaelBAnderson opened this issue Oct 29, 2019 · 1 comment

Comments

@MichaelBAnderson
Copy link

@MichaelBAnderson MichaelBAnderson commented Oct 29, 2019

Dear All,

I believe I found an issue. At the end of Episode 4 and in Episode 5 we are instructed on two important functions: "analyze" and "analyze_all"

The analyze function opens a file based on the filename and plots the mean, max and min for the columns, and works as expected. The analyze_all function is not working (at-least for me):

analyze_all <- function(folder = "data", pattern) {
filenames <- list.files(path = folder, pattern = pattern, full.names = TRUE)
for (f in filenames) {
analyze(f)
}
}

The error message is helpful because it indicates the problem has to do with identifying filenames by their string pattern (pattern = pattern). To fix, the second pattern can be changed to "inflammation.*csv" (pattern = "inflammation.*csv").

I am planning to do a pull-request for episode 5 after my demo this Thursday so I will add this to that. If I am wrong about my understanding of the episode, please let me know.

Thanks,

-Michael

@MichaelBAnderson
Copy link
Author

@MichaelBAnderson MichaelBAnderson commented Nov 11, 2019

I am new to doing the pull requests and have just completed my first (about the command line program location for saving/storing scripts). I am waiting to begin a pull request here to see how the first request is resolved. If it is possible I would also like to know if anyone else had a problem with the analyze_all function. I had to change (pattern = pattern) to (pattern - inflammation.*csv) for it to work. But it seems strange that it has not been fixed before now, since it is an important function that is used over and over again in the lesson.

Can anyone confirm that this is indeed an issue?

If, so, I will fix and push it.

Thanks,

-Michael

@HaoZeke HaoZeke assigned HaoZeke and unassigned HaoZeke Nov 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants