Edit list elements when condition is met

0 votes
How to edit the list element at a certain position in the nested list? I used a nested list structure like JSON data with names, a few elements where stored in Uppercase and few in lower cases. How to change at specific parts if elements are lower case to uppercase?
Oct 23, 2019 in Data Analytics by anonymous
• 3,380 points
47 views

1 answer to this question.

0 votes
You can use regular if condition with for loop to check each index of the list and edit their values.

Another way is to create a function with condition and then pass the list to check for the condition.
answered Oct 31, 2019 by Cherukuri
• 32,440 points

Related Questions In Data Analytics

0 votes
1 answer
0 votes
0 answers

Remove specific elements from list using condition in R

How to remove specific elements from list ...READ MORE

Aug 13, 2019 in Data Analytics by radha
38 views
0 votes
2 answers

When scoring a logistic regression model , is having the predicted variable in test dataset mandatory ?

Answer to your follow up question: We can ...READ MORE

answered Oct 17, 2018 in Data Analytics by Anmol
• 1,700 points
97 views
0 votes
1 answer

Error saying "Error in df$item : object of type 'closure' is not subsettable" when trying to use arules package

Try replacing ID <- c("A123","A123","A123","A123","B456","B456","B456") item <- c("bread", "butter", ...READ MORE

answered Nov 15, 2018 in Data Analytics by Maverick
• 10,800 points
275 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
300 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
268 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
114 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
163 views
0 votes
1 answer
0 votes
1 answer

Search elements in a vector or list

There are multiple functions and operators that can ...READ MORE

answered Aug 21, 2019 in Data Analytics by Cherukuri
• 32,440 points
31 views