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,450 points
529 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
• 33,030 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
1,355 views
0 votes
0 answers

Understanding output of rbind function when a list is passed as argument

While using R to practise fundamental matrices ...READ MORE

Jun 24, 2022 in Data Analytics by Avinash
• 1,260 points
452 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,780 points
1,354 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,265 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,962 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,200 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,393 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 22, 2019 in Data Analytics by Cherukuri
• 33,030 points
552 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