Closed mesp9943 closed 3 years ago
Hi @mesp9943,
thank you for your suggestion! I agree with you that manipulating and searching strings is an essential skill to master for data analysis work and paste()
and perhaps paste0()
should definitely be a function that learners learn in a beginner's course like this one. Also, the {stringr}
package is a great toolbox to know (along with {glue}
, I might add).
At the moment paste()
is introduced in the working with dates section for the purpose you suggest (concatenating columns in a data frame).
I don't have an idea where paste0()
or the {stringr}
package would fit naturally into the lesson. It's important to strike the right balance between introducing useful functions and packages and not going off on too many tangents. After all, this is supposed to be a short intro course for beginners, and it's already packed with a lot of information for the intended "novice programmer" audience.
With that in mind, do you have a suggestion where you would add the additional function? Otherwise, I would be inclined to leave it as it is.
I will close this issue since there hasn't been a response from @mesp9943 and the suggested changes seem to be partially implemented already.
If anyone disagrees, please feel free to reopen.
During the R-ecology training I participated in as an assistant instructor a student asked about how to concatenate two strings or items in a dataset. I think it'd be a beneficial contribution in the lesson to go a bit into the stringr package or how to use functions paste() or paste0() briefly. I also often use str_detect() function from the stringr package quite often in my analyses-this might come in handy for ecologists using R.