---
title: "3 Real-time House Keeping Ideas to Clean Data in R Language"
description: "House keeping you need to do in R Language before closing your session. The popular functions you need to use are search(), objects(), list(), ls(), and detach()."
url: https://srinimf.com/2018/11/11/3-real-time-house-keeping-ideas-to-clean-data-in-r-language/
date: 2018-11-11
modified: 2026-10-10
author: "Srini"
image: https://i0.wp.com/srinimf.com/wp-content/uploads/2018/11/housekeeping.jpg?fit=500%2C400&ssl=1
categories: ["R Language"]
tags: ["House keeping in R", "R Language Tips and Tricks", "r list example", "r search tutorial"]
type: post
lang: en
---

# 3 Real-time House Keeping Ideas to Clean Data in R Language

[You need](https://srinimf.com/2018/04/27/two-things-of-blockchain-to-know-before-start-you-career/) [to learn](https://srinimf.com/2018/09/13/rpg-programming-language-unique-concepts-to-learn-quickly/) few housekeeping commands. A first time or experienced developer should use these commands. The top r functions are search(), objects(), list(), ls(), and detach().

Related[Top IMS DC Interview Questions for Experienced](https://srinimf.com/2015/05/13/top-imsdc-interview-questions-part-1/)

## House Keeping Functions in R

### Objects

```
objects()
```

This command shows a list of variables you created during your session. You can delete any additional objects you created.

```
> objects()
character(0)
```

### Search

```
search()
```

```
search()
[1] ".GlobalEnv"        "tools:rstudio"     "package:stats"
[4] "package:graphics"  "package:grDevices" "package:utils"
[7] "package:datasets"  "package:methods"   "Autoloads"
[10] "package:base"
```

Related[Super Package, Complex Package and Participating Package](https://srinimf.com/2014/10/11/super-package-complex-package-and-participating-package/)

Search command shows the packages and [dataframes](https://www.datamentor.io/r-programming/data-frame/)you created.

### Deleting Variables

```
> rm(x,y,z)
```

You can remove variables you created with R Languages. The command to create ‘x’ variable is as follows  >x >- 5

>rm(list=ls())

The ‘rm’ function removes all the variables you defined in your session. The list() function is generic, and it shows all the object. In the above command, ls() is one object. 

#### Online R Language for Practice

- This is the reference where you can do [practice for R Language](https://rstudio.cloud).

### Detach() Function

The detach() function without arguments delete the first item in the search path. The return value from detaching is invisible. That means NULL value.

### Share this:

-
- [Tweet](https://twitter.com/share)
- [![](https://i0.wp.com/assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png)](https://www.pinterest.com/pin/create/link/?url=https%3A%2F%2Fsrinimf.com%2F2018%2F11%2F11%2F3-real-time-house-keeping-ideas-to-clean-data-in-r-language%2F&media=https%3A%2F%2Fi0.wp.com%2Fsrinimf.com%2Fwp-content%2Fuploads%2F2018%2F11%2Fhousekeeping.jpg%3Ffit%3D500%252C400%26ssl%3D1&description=3%20Real-time%20House%20Keeping%20Ideas%20to%20Clean%20Data%20in%20R%20Language)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2018/11/11/3-real-time-house-keeping-ideas-to-clean-data-in-r-language/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2018/11/11/3-real-time-house-keeping-ideas-to-clean-data-in-r-language/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2018/11/11/3-real-time-house-keeping-ideas-to-clean-data-in-r-language/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2018/11/11/3-real-time-house-keeping-ideas-to-clean-data-in-r-language/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%203%20Real-time%20House%20Keeping%20Ideas%20to%20Clean%20Data%20in%20R%20Language&body=https%3A%2F%2Fsrinimf.com%2F2018%2F11%2F11%2F3-real-time-house-keeping-ideas-to-clean-data-in-r-language%2F&share=email)
-

### Like this:

Like Loading…