From b0ca28b8e8bae2fdbf97e2a16286009f9cf020c5 Mon Sep 17 00:00:00 2001 From: Ethan White Date: Fri, 4 Nov 2022 10:34:47 -0400 Subject: [PATCH] Remove unneeded information from looping over files --- materials/for-loops-R.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/materials/for-loops-R.md b/materials/for-loops-R.md index d58dbb8fc..80848d18b 100644 --- a/materials/for-loops-R.md +++ b/materials/for-loops-R.md @@ -197,12 +197,10 @@ list.files() ``` * But we just want the data files so we'll add the optional `pattern` argument to only get the files that start with `"locations-"` -* The `*` is a wild card, so this means "starts with locations- and includes anything afterwards" ```r -data_files = list.files(pattern = "locations-*", - full.names = TRUE) +data_files = list.files(pattern = "locations-") ``` * Once we have this list we can loop over it count the number of observations in each file