Replace columns containing row id into a constant value - R

0 votes
How to replace columns containing row id into a constant value in R?

I have got a list of employee to which the status needs to be changed to be on-bench if no projects are done by an employee for past 2 months. How to replace the status of these employees into a single constant value in R?
Jul 1 in Data Analytics by raghunath
9 views

1 answer to this question.

0 votes

Create a vector of the list of employee id using c().

Suppose your list = [134,177,203,223,234,.....]

Then write as below, 

 replace(Employee$Status,list,"On Bench")

This would change all the employees with id in the list to "On Bench".

answered Jul 4 by Cherukuri
• 17,870 points

Related Questions In Data Analytics

0 votes
2 answers

Transforming a key/value string into distinct rows in R

We would start off by loading the ...READ MORE

answered Mar 26, 2018 in Data Analytics by Bharani
• 4,550 points
46 views
0 votes
1 answer

Locating row index of a column which has the maximum value - R

which.max(iris$Sepal.Length) This command will give you the desired ...READ MORE

answered May 16, 2018 in Data Analytics by Bharani
• 4,550 points
61 views
0 votes
1 answer

How to spilt a column of a data frame into multiple columns

it is easily achievable by using "stringr" ...READ MORE

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

How to sort a data frame by columns in R?

You can just use the order function ...READ MORE

answered Apr 10, 2018 in Data Analytics by darklord
• 6,140 points
73 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,700 points
65 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,700 points
78 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,700 points
60 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,700 points
41 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 28 in Data Analytics by anonymous
• 17,870 points
34 views
0 votes
1 answer

Show a list of all variables in R

Hi Swathi, You can use ls() to list ...READ MORE

answered Jun 27 in Data Analytics by Cherukuri
• 17,870 points
27 views