Show a list of all variables in R

+2 votes
HI, i have a lot of variables in my R Script. Each time i need to check in the environment variables. Is there any way to show or search variables in R with any pattern or string?
Jun 27, 2019 in Data Analytics by swathi
87,458 views

1 answer to this question.

+2 votes
Best answer

Hi Swathi,

You can use ls() to list all variables that are created in the environment.

ls() can be used to fetch variables in different ways

  • List all Variables 

             Use ls() to display all variables.

             

  • Using a character pattern

            pat = " " is used for pattern matching such as ^, $, ., etc.

            

Hope it helps!

Transform data into actionable insights with our Data Analytics Course – Enroll today!

answered Jun 27, 2019 by Cherukuri
• 33,030 points

selected Dec 15, 2020 by MD
Thanks. It worked.

Related Questions In Data Analytics

0 votes
1 answer
0 votes
1 answer

How to create dummy variables based on a categorical variable of lists in R?

You can use mtabulate in the following way: library(qdapTools) cbind(data[1], ...READ MORE

answered Apr 13, 2018 in Data Analytics by CodingByHeart77
• 3,740 points
2,292 views
+1 vote
1 answer

How to convert a list of dataframes in to a single dataframe using R?

You can use the plyr function: data <- ...READ MORE

answered Apr 14, 2018 in Data Analytics by Sahiti
• 6,370 points
6,282 views
0 votes
1 answer

How can I get type of all variables in R?

It is a easy task and one ...READ MORE

answered May 22, 2018 in Data Analytics by zombie
• 3,790 points
885 views
0 votes
1 answer

By using dpylr package sum of multiple columns

Basically here we are making an equation ...READ MORE

answered Apr 5, 2018 in Data Analytics by DeepCoder786
• 1,720 points
1,993 views
0 votes
1 answer

How to convert a text mining termDocumentMatrix into excel or csv in R?

By assuming that all the values are ...READ MORE

answered Apr 5, 2018 in Data Analytics by DeepCoder786
• 1,720 points
1,605 views
0 votes
1 answer

In a dpylr pipline how to use sample and seq?

For avoiding rowwise(), I prefer to use ...READ MORE

answered Apr 6, 2018 in Data Analytics by DeepCoder786
• 1,720 points

edited Jun 9, 2020 by Gitika 892 views
0 votes
1 answer

How to create a list of Data frames?

Basically all we have to do is ...READ MORE

answered Apr 9, 2018 in Data Analytics by DeepCoder786
• 1,720 points
997 views
0 votes
1 answer

How to replace all occurrences of a character in a character column in a data frame in R

If you used sub() to replace the ...READ MORE

answered Jun 29, 2019 in Data Analytics by anonymous
• 33,030 points
17,490 views
0 votes
1 answer

How do I make a matrix from a list of vectors in R?

Suppose l1 and l2 are my vectors, li = ...READ MORE

answered Aug 7, 2019 in Data Analytics by Cherukuri
• 33,030 points
829 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP