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 in Data Analytics by anonymous
• 3,290 points
15 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 by Cherukuri
• 31,840 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 in Data Analytics by radha
17 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,610 points
73 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,040 points
180 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
115 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
159 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
86 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
104 views
0 votes
1 answer

Search elements in a vector or list

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

answered Aug 21 in Data Analytics by Cherukuri
• 31,840 points
13 views