List should be atomic

0 votes
"List should be atomic" What does this mean?
Oct 16, 2019 in Data Analytics by ch
• 3,450 points
469 views

1 answer to this question.

0 votes
@ch,

A few functions only work with an atomic list and not all lists such as sort. The list is atomic when there is a single value at each position and no other R objects. This warning pops up for those functions that are used with nested lists.

> list(1,1:5,6)
[[1]]
[1] 1

[[2]]
[1] 1 2 3 4 5

[[3]]
[1] 6

> sort(list(1,1:5,6))
Error in sort.int(x, na.last = na.last, decreasing = decreasing, ...) :
  'x' must be atomic
answered Oct 28, 2019 by Cherukuri
• 33,030 points

Related Questions In Data Analytics

+1 vote
1 answer

How to convert a list of vectors with various length into a Data.Frame?

We can easily use this command as.data.frame(lapply(d1, "length< ...READ MORE

answered Apr 4, 2018 in Data Analytics by DeepCoder786
• 1,720 points
1,661 views
0 votes
1 answer

How can I use parallel so that it preserves the list of data frames

You can use pmap as follows: nc <- ...READ MORE

answered Apr 4, 2018 in Data Analytics by kappa3010
• 2,090 points
1,071 views
0 votes
1 answer

How to join two tables (tibbles) by *list* columns in R

You can use the hash from digest ...READ MORE

answered Apr 6, 2018 in Data Analytics by kappa3010
• 2,090 points
1,701 views
0 votes
1 answer

Join list of data.frames using map() call

You can use Reduce set.seed(24) r1 <- map(c(5, 10, 15), ...READ MORE

answered Apr 6, 2018 in Data Analytics by Sahiti
• 6,370 points
1,046 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,920 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,339 views
0 votes
1 answer

Difference between List(list1,list2) and c(list1,list2) in R

Hi Deepa, It's quite simple, let me explain ...READ MORE

answered Jun 26, 2019 in Data Analytics by Cherukuri
• 33,030 points
2,069 views
+2 votes
1 answer

Show a list of all variables in R

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

answered Jun 27, 2019 in Data Analytics by Cherukuri
• 33,030 points
96,362 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