2

everyone

I brought some new trivial questions to ask. I've searched, but I failed to look for the most efficient answer.

The string(or list) I would like to make looks like:

c("who","expr1","who","expr2",...,"who","expr100")

How can I efficiently make this string using loop(or another function) in R?

Thank you~!!

0

1 Answer 1

3

At least this is one choice:

c(rbind("who", paste0("expr", 1:100)))
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.