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, 2019 in Data Analytics by raghunath
685 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, 2019 by Cherukuri
• 33,030 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,660 points
1,181 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,720 points
1,776 views
0 votes
1 answer

How to import data from a Json file into R?

Easy and simple: library("rjson") json_file <- "file_name" json_data <- fromJSON(file=json_file)) or ...READ MORE

answered Apr 26, 2018 in Data Analytics by DeepCoder786
• 1,720 points
2,361 views
0 votes
1 answer

How to delete DataFrame row in pandas based upon a column value?

You can use drop function in your ...READ MORE

answered May 3, 2018 in Data Analytics by DeepCoder786
• 1,720 points

edited Jun 9, 2020 by MD 1,621 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
2,250 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,921 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 1,182 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
1,342 views
+1 vote
2 answers

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

Hi, Nirvana You can also try this. which(iris$Sepal.Length == ...READ MORE

answered Aug 21, 2019 in Data Analytics by anonymous
• 33,030 points
13,026 views
+1 vote
2 answers

How to sort a data frame by columns in R?

You can use dplyr function arrange() like ...READ MORE

answered Aug 21, 2019 in Data Analytics by anonymous
• 33,030 points
1,813 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