in python to parse all the variables that have a name ending for example with "_df" I would use something similar to what I found here. How to do a similar thing in R? Namely, I have several variables ending with _df and I have to do some actions to these. Thanks
This question is in a collective: a subcommunity defined by tags with relevant content and experts.
- The Overflow Blog
-
- Featured on Meta
-
-
-
Linked
Hot Network Questions
- Game with shrinking one's self as main gimmick/mechanic
- Structure of “僕はビールです”
- Selberg's result on primes in short intervals
- When exactly does the game clock start during an American football kickoff?
- How to neatly align name, Google Scholar metrics (h-index, citations), and profile photo in a CV header?
- What is the power of the purse?
- Movie about two immortals: a young girl and an older guy. The guy would collect and kill people for the girl to feed on
- constexpr self-referencing struct
- Bash script for manually cleaning up the Traefik access log file and limiting it to a maximum of 50 MB
- Are Linux kernels compiled with UBSAN turned on?
- Is it a problem if I don’t have a recommendation letter from my thesis advisor due to retirement?
- Is there a difference in military court proceedings that would make it easier to convict the "seditious" congress members?
- Magic item feedback: Karmic Ring
- Why doesn't leaked confidential information often result in prosecutions for the leaker(s)?
- Calculating two highest maximum values of field in QGIS
- Why does JavaScript use autoboxing?
- How to properly bevel edges of text?
- Fool a program it has a pty of specific size
- Why did Jesus say that he is the light of the world while in it?
- Should wires stripped too small be redone?
- Algebra isomorphic to its complex conjugate
- Bivouacs made by the homeless
- “Why don’t these images look like 4:3 even though the book says 4:3?”
- How far can an infinite number of unit length planks bridge a right-angled gap?
lang-r
ends_withfrom dplyr or usegrep(".*_df$", your_files_names)to locate files. This a general answer since your question is to broad. Provide a minimal example and we can help you better.mget(ls(pattern = "_df$"))It would be better to keep such related values in a list in the first place in R rather than separate variables in the global environment.