Question: I am fairly new to R and I would like to paste the string "exampletext" in front of each file name within the path.

```
   csvList <- list.files(path = "./csv_by_subject") %>%
      paste0("*exampletext") 

```

Currently this code renders things like "csv\*exampletext" and I want it to be \*exampletextcsv". I would like to continue to using dplyr and piping - help appreciated!

Answer: 
As others pointed out, the pipe is not necessary here. But if you do want to use it, you just have to specify that the second argument to `paste0` is "the thing you are piping", which you do using a period (.)

```
list.files(path = "./csv_by_subject") %>%
      paste0("*exampletext", .)

```
If you'd like to paste \*exampletext before all of the file names, you can reverse the order of what you're doing now using paste0 and passing the second argument as list.files. paste0 can handle vectors as the second argument and will apply the paste to each element.

```
 csvList <- paste0("*exampletext", list.files(path = "./csv_by_subject"))

```

This returns a few examples from a local folder on my machine:

```
csvList

  [1] "*exampletext_error_metric.m"                                                                                      
  [2] "*exampletext_get_K_clusters.m"         
...

```