Subset rows in dataframe with at least two of the multiple conditions - r

This has already been answered at this link (subset by at least two out of multiple conditions), however, I have an additional query to this. Following is my dataframe (df)
a b c d1 d2 e z
3.2 0.6 5.8 143.7 95.0 2.9 2
3.3 1.3 5.3 137.3 73.3 1.0 1
2.8 1.3 5.6 135.3 79.3 1.8 2
2.9 1.4 5.3 137.7 82.0 1.9 2
4.7 1.8 5.5 143.0 86.5 1.5 1
3.2 1.4 5.8 125.3 79.0 1.5 2
2.6 1.8 5.8 137.3 79.0 1.0 1
3.4 1.4 5.1 132.0 72.3 1.0 1
3.5 1.8 5.0 130.7 75.7 2.0 2
2.1 1.2 4.6 108.3 70.7 1.5 2
3.8 1.7 5.1 133.5 79.8 1.8 2
3.3 1.3 5.1 121.7 79.7 1.5 2
5.2 1.5 5.2 144.7 88.3 1.5 2
4.8 1.2 5.3 127.7 78.0 1.8 2
2.8 0.6 5.4 116.7 61.7 2.0 2
3.7 1.4 4.7 101.0 63.3 1.6 2
2.9 1.4 5.0 121.3 76.3 1.5 2
2.2 1.5 5.3 144.3 83.7 1.6 2
4.4 0.8 5.1 140.0 84.7 1.4 2
5.0 2.4 5.5 124.3 83.0 1.6 2
1.9 0.9 5.4 143.0 79.7 1.1 1
4.5 1.7 5.8 143.7 91.7 0.9 1
3.3 0.7 5.1 127.3 69.3 2.2 2
3.4 1.3 5.6 161.0 87.7 1.7 2
4.5 1.8 6.1 139.7 75.3 1.2 1
3.9 0.8 5.2 99.3 61.0 1.2 2
2.6 2.4 4.8 127.0 79.3 1.8 2
3.4 0.9 5.3 130.0 79.0 1.0 1
2.7 0.4 4.8 135.0 83.7 1.0 2
2.9 1.9 4.7 132.7 90.3 1.5 2
3.9 1.1 6.5 126.3 68.0 1.3 2
3.1 0.9 5.9 152.0 98.3 1.3 1
4.6 1.7 6.0 144.0 96.3 1.5 1
4.1 4.8 5.1 132.7 70.3 0.8 1
5.9 1.2 5.6 130.3 79.0 1.4 2
3.9 2.9 5.3 128.0 76.3 0.7 1
3.2 1.3 5.9 151.7 88.7 1.4 2
3.7 4.0 6.4 133.0 82.7 1.2 2
3.1 1.4 6.6 124.7 76.0 1.0 1
2.9 0.6 5.4 121.0 74.0 2.1 2
3.4 4.1 5.1 137.3 69.0 0.8 1
3.4 2.7 4.9 136.3 78.3 1.4 1
4.0 0.9 4.8 123.0 71.0 2.1 2
2.5 0.8 4.5 175.3 107.8 1.7 1
5.0 2.2 5.2 151.7 78.7 1.3 1
3.9 6.4 5.6 128.7 85.3 0.6 1
3.4 1.5 5.7 131.0 81.0 1.5 1
3.7 0.9 5.3 104.7 67.0 0.9 2
2.3 1.8 5.8 126.3 78.7 1.0 1
5.0 1.3 5.5 134.7 85.7 1.2 1
3.2 1.9 6.1 130.7 77.7 0.9 2
3.8 1.8 5.8 123.0 75.0 1.4 1
3.6 2.1 5.0 135.3 87.0 1.3 1
3.7 3.5 6.0 145.8 80.3 1.4 1
3.2 0.6 4.7 114.0 71.0 1.9 2
3.9 1.5 5.3 129.7 87.0 1.2 1
4.3 1.4 4.9 105.0 67.7 1.2 2
4.2 2.7 6.3 122.0 76.7 1.2 2
4.8 2.9 5.6 131.0 76.3 1.1 1
2.5 2.2 5.4 115.3 70.7 1.3 1
2.5 1.4 5.1 148.3 93.3 2.4 2
3.7 0.8 4.7 117.3 77.7 1.2 2
4.0 2.7 6.2 127.3 79.3 1.1 2
2.6 1.2 5.6 155.3 109.7 1.5 1
3.3 2.1 5.1 118.7 72.3 1.4 2
4.2 0.8 5.4 126.0 73.7 2.0 2
4.0 1.6 5.3 153.0 86.7 1.4 2
3.8 1.2 6.7 154.3 84.0 1.6 2
3.2 1.8 5.4 168.7 87.7 1.2 1
3.2 1.3 5.2 135.0 74.3 1.2 1
3.5 1.2 5.9 138.3 75.3 1.4 1
3.6 1.4 5.1 126.7 81.0 1.1 2
3.3 1.7 6.4 152.3 87.7 1.5 1
2.6 0.7 5.6 134.3 74.7 2.2 2
4.1 1.8 5.8 154.8 83.0 1.7 2
2.5 1.0 4.6 147.7 93.0 1.2 1
4.0 1.7 5.9 132.3 80.7 1.3 1
3.2 1.5 6.1 144.3 85.0 1.3 1
2.8 1.6 4.7 115.3 81.0 1.4 2
3.4 1.0 6.0 130.8 80.3 1.2 1
2.9 1.3 5.5 132.7 82.3 1.5 2
4.0 1.9 5.9 114.0 67.7 1.7 2
4.1 1.3 5.3 129.7 77.0 1.4 2
1.9 1.1 6.1 124.3 58.0 1.5 2
3.0 1.2 5.0 129.3 81.7 1.6 2
4.1 0.9 5.0 129.7 80.3 1.5 1
3.2 2.8 5.5 127.3 72.8 1.0 1
3.2 1.0 4.6 135.7 80.0 2.8 2
3.0 1.7 5.7 154.3 88.3 1.4 2
3.2 3.1 6.2 129.3 76.7 1.2 1
I want to subset this in such a way that at least 2 of the following 5 conditions are met:
a >= 4.11
b >= 2.26
c >= 5.6
d1 <= 140 and/or d2 <= 90 (considering both these variables d1 and/or d2 as one condition)
e <= 1.03 mmol/L (when z == 1) and e <= 1.29 mmol/L (when z == 2)
I understand how to add the first 3 in the following code, but can anyone help me with how can I add the last 2 conditions as well?
df_new <- df[rowSums(cbind(df$a >= 4.11, df$b >= 2.26, df$c >= 5.6)) > 1,]
Thanks in advance.

By combining filter with filter_if from the dplyr package you can filter (subset) your data based on your conditions
library(dplyr)
as_data_frame(df) -> df
# commas represent AND statements
df %>%
filter(
a >= 4.11,
b >= 2.26,
c >= 5.6,
d1 <=140,
d2 <= 90
) %>%
filter_if(
z == 1 & e <= 1.29, e <=1.03 # conditional filering
)->df_new

Related

Sort data frame using last column name in R [duplicate]

This question already has answers here:
Order data frame by the last column with dplyr
(3 answers)
Closed 7 months ago.
I want to automatically sort the data frame based on the last column name.
Since the last column name in my data frame will be dynamic, I cannot specify the column name.
Below is what i want to achieve as an output.
iris %>%
select(-Species) %>%
arrange(desc(Petal.Width))
As suggested in response i tried below option, however it dosen't work. Am i missing something?
iris %>%
select(-Species) %>%
arrange(desc(ncol(.)))
last_col() is only supported in functions that feature tidy selection syntax, which arrange()doesn’t.
ncol() will give you the number of the last column, we can use it to subset the data.frame.
See TarJae‘s answer for another Dplyr option to make tidy selection syntax available inside arrange().
library(dplyr)
iris %>%
select(!Species) %>%
arrange(desc(.[,ncol(.)]))
#> Sepal.Length Sepal.Width Petal.Length Petal.Width
#> 1 6.3 3.3 6.0 2.5
#> 2 7.2 3.6 6.1 2.5
#> 3 6.7 3.3 5.7 2.5
#> 4 5.8 2.8 5.1 2.4
#> 5 6.3 3.4 5.6 2.4
#> 6 6.7 3.1 5.6 2.4
#> 7 6.4 3.2 5.3 2.3
#> 8 7.7 2.6 6.9 2.3
#> 9 6.9 3.2 5.7 2.3
#> 10 7.7 3.0 6.1 2.3
#> 11 6.9 3.1 5.1 2.3
#> 12 6.8 3.2 5.9 2.3
#> 13 6.7 3.0 5.2 2.3
#> 14 6.2 3.4 5.4 2.3
#> 15 6.5 3.0 5.8 2.2
#> 16 7.7 3.8 6.7 2.2
#> 17 6.4 2.8 5.6 2.2
#> 18 7.1 3.0 5.9 2.1
#> 19 7.6 3.0 6.6 2.1
#> 20 6.8 3.0 5.5 2.1
#> 21 6.7 3.3 5.7 2.1
#> 22 6.4 2.8 5.6 2.1
#> 23 6.9 3.1 5.4 2.1
#> 24 6.5 3.2 5.1 2.0
#> 25 5.7 2.5 5.0 2.0
#> 26 5.6 2.8 4.9 2.0
#> 27 7.7 2.8 6.7 2.0
#> 28 7.9 3.8 6.4 2.0
#> 29 6.5 3.0 5.2 2.0
#> 30 5.8 2.7 5.1 1.9
#> 31 6.4 2.7 5.3 1.9
#> 32 7.4 2.8 6.1 1.9
#> 33 5.8 2.7 5.1 1.9
#> 34 6.3 2.5 5.0 1.9
#> 35 5.9 3.2 4.8 1.8
#> 36 6.3 2.9 5.6 1.8
#> 37 7.3 2.9 6.3 1.8
#> 38 6.7 2.5 5.8 1.8
#> 39 6.5 3.0 5.5 1.8
#> 40 6.3 2.7 4.9 1.8
#> 41 7.2 3.2 6.0 1.8
#> 42 6.2 2.8 4.8 1.8
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4 1.5 0.2
#> 141 4.4 3.2 1.3 0.2
#> 142 5.1 3.8 1.6 0.2
#> 143 4.6 3.2 1.4 0.2
#> 144 5.3 3.7 1.5 0.2
#> 145 5.0 3.3 1.4 0.2
#> 146 4.9 3.1 1.5 0.1
#> 147 4.8 3.0 1.4 0.1
#> 148 4.3 3.0 1.1 0.1
#> 149 5.2 4.1 1.5 0.1
#> 150 4.9 3.6 1.4 0.1
Created on 2022-08-07 by the reprex package (v2.0.1)
We could do it using across:
library(dplyr)
library(psych) # for `headTail()`
iris %>%
select(-Species) %>%
arrange(across(last_col(), desc)) %>%
headTail()
Sepal.Length Sepal.Width Petal.Length Petal.Width
1 6.3 3.3 6 2.5
2 7.2 3.6 6.1 2.5
3 6.7 3.3 5.7 2.5
4 5.8 2.8 5.1 2.4
... ... ... ... ...
147 4.8 3 1.4 0.1
148 4.3 3 1.1 0.1
149 5.2 4.1 1.5 0.1
150 4.9 3.6 1.4 0.1
Using Base R option
subset(iris , select = -Species) |>
(\(x) x[order(- x[ncol(x)]) , ])()
output
Sepal.Length Sepal.Width Petal.Length Petal.Width
101 6.3 3.3 6.0 2.5
110 7.2 3.6 6.1 2.5
145 6.7 3.3 5.7 2.5
115 5.8 2.8 5.1 2.4
137 6.3 3.4 5.6 2.4
141 6.7 3.1 5.6 2.4
116 6.4 3.2 5.3 2.3
119 7.7 2.6 6.9 2.3
......................................................
40 5.1 3.4 1.5 0.2
43 4.4 3.2 1.3 0.2
47 5.1 3.8 1.6 0.2
48 4.6 3.2 1.4 0.2
49 5.3 3.7 1.5 0.2
50 5.0 3.3 1.4 0.2
10 4.9 3.1 1.5 0.1
13 4.8 3.0 1.4 0.1
14 4.3 3.0 1.1 0.1
33 5.2 4.1 1.5 0.1
38 4.9 3.6 1.4 0.1

How to split a dataframe based on column class

Let's take the iris dataset for example.
I want to create two dataframes from this one. This first one would have the contiuous variables, and the second one the discrete ones.
What I do first is create a list with the category of the column
iris <- iris
a <- lapply(iris, class)
Then I create two empty lists and store the index of both discrete and continuous columns.
cont <- list()
disc <- list()
for (i in 1:length(a)){
if (a[[i]][1] == "numeric")
cont <- append(cont, i)
else
disc <- append(disc, i)
}
But I do not know how to split based on this lists.
Try the following code:
classes_iris <- sapply(iris, class)
split.default(iris, classes_iris)
Output:
$factor
Species
1 setosa
2 setosa
3 setosa
4 setosa
5 setosa
6 setosa
7 setosa
8 setosa
9 setosa
10 setosa
11 setosa
12 setosa
13 setosa
14 setosa
15 setosa
16 setosa
17 setosa
18 setosa
19 setosa
20 setosa
21 setosa
22 setosa
23 setosa
24 setosa
25 setosa
26 setosa
27 setosa
28 setosa
29 setosa
30 setosa
31 setosa
32 setosa
33 setosa
34 setosa
35 setosa
36 setosa
37 setosa
38 setosa
39 setosa
40 setosa
41 setosa
42 setosa
43 setosa
44 setosa
45 setosa
46 setosa
47 setosa
48 setosa
49 setosa
50 setosa
51 versicolor
52 versicolor
53 versicolor
54 versicolor
55 versicolor
56 versicolor
57 versicolor
58 versicolor
59 versicolor
60 versicolor
61 versicolor
62 versicolor
63 versicolor
64 versicolor
65 versicolor
66 versicolor
67 versicolor
68 versicolor
69 versicolor
70 versicolor
71 versicolor
72 versicolor
73 versicolor
74 versicolor
75 versicolor
76 versicolor
77 versicolor
78 versicolor
79 versicolor
80 versicolor
81 versicolor
82 versicolor
83 versicolor
84 versicolor
85 versicolor
86 versicolor
87 versicolor
88 versicolor
89 versicolor
90 versicolor
91 versicolor
92 versicolor
93 versicolor
94 versicolor
95 versicolor
96 versicolor
97 versicolor
98 versicolor
99 versicolor
100 versicolor
101 virginica
102 virginica
103 virginica
104 virginica
105 virginica
106 virginica
107 virginica
108 virginica
109 virginica
110 virginica
111 virginica
112 virginica
113 virginica
114 virginica
115 virginica
116 virginica
117 virginica
118 virginica
119 virginica
120 virginica
121 virginica
122 virginica
123 virginica
124 virginica
125 virginica
126 virginica
127 virginica
128 virginica
129 virginica
130 virginica
131 virginica
132 virginica
133 virginica
134 virginica
135 virginica
136 virginica
137 virginica
138 virginica
139 virginica
140 virginica
141 virginica
142 virginica
143 virginica
144 virginica
145 virginica
146 virginica
147 virginica
148 virginica
149 virginica
150 virginica
$numeric
Sepal.Length Sepal.Width Petal.Length Petal.Width
1 5.1 3.5 1.4 0.2
2 4.9 3.0 1.4 0.2
3 4.7 3.2 1.3 0.2
4 4.6 3.1 1.5 0.2
5 5.0 3.6 1.4 0.2
6 5.4 3.9 1.7 0.4
7 4.6 3.4 1.4 0.3
8 5.0 3.4 1.5 0.2
9 4.4 2.9 1.4 0.2
10 4.9 3.1 1.5 0.1
11 5.4 3.7 1.5 0.2
12 4.8 3.4 1.6 0.2
13 4.8 3.0 1.4 0.1
14 4.3 3.0 1.1 0.1
15 5.8 4.0 1.2 0.2
16 5.7 4.4 1.5 0.4
17 5.4 3.9 1.3 0.4
18 5.1 3.5 1.4 0.3
19 5.7 3.8 1.7 0.3
20 5.1 3.8 1.5 0.3
21 5.4 3.4 1.7 0.2
22 5.1 3.7 1.5 0.4
23 4.6 3.6 1.0 0.2
24 5.1 3.3 1.7 0.5
25 4.8 3.4 1.9 0.2
26 5.0 3.0 1.6 0.2
27 5.0 3.4 1.6 0.4
28 5.2 3.5 1.5 0.2
29 5.2 3.4 1.4 0.2
30 4.7 3.2 1.6 0.2
31 4.8 3.1 1.6 0.2
32 5.4 3.4 1.5 0.4
33 5.2 4.1 1.5 0.1
34 5.5 4.2 1.4 0.2
35 4.9 3.1 1.5 0.2
36 5.0 3.2 1.2 0.2
37 5.5 3.5 1.3 0.2
38 4.9 3.6 1.4 0.1
39 4.4 3.0 1.3 0.2
40 5.1 3.4 1.5 0.2
41 5.0 3.5 1.3 0.3
42 4.5 2.3 1.3 0.3
43 4.4 3.2 1.3 0.2
44 5.0 3.5 1.6 0.6
45 5.1 3.8 1.9 0.4
46 4.8 3.0 1.4 0.3
47 5.1 3.8 1.6 0.2
48 4.6 3.2 1.4 0.2
49 5.3 3.7 1.5 0.2
50 5.0 3.3 1.4 0.2
51 7.0 3.2 4.7 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3 1.8
109 6.7 2.5 5.8 1.8
110 7.2 3.6 6.1 2.5
111 6.5 3.2 5.1 2.0
112 6.4 2.7 5.3 1.9
113 6.8 3.0 5.5 2.1
114 5.7 2.5 5.0 2.0
115 5.8 2.8 5.1 2.4
116 6.4 3.2 5.3 2.3
117 6.5 3.0 5.5 1.8
118 7.7 3.8 6.7 2.2
119 7.7 2.6 6.9 2.3
120 6.0 2.2 5.0 1.5
121 6.9 3.2 5.7 2.3
122 5.6 2.8 4.9 2.0
123 7.7 2.8 6.7 2.0
124 6.3 2.7 4.9 1.8
125 6.7 3.3 5.7 2.1
126 7.2 3.2 6.0 1.8
127 6.2 2.8 4.8 1.8
128 6.1 3.0 4.9 1.8
129 6.4 2.8 5.6 2.1
130 7.2 3.0 5.8 1.6
131 7.4 2.8 6.1 1.9
132 7.9 3.8 6.4 2.0
133 6.4 2.8 5.6 2.2
134 6.3 2.8 5.1 1.5
135 6.1 2.6 5.6 1.4
136 7.7 3.0 6.1 2.3
137 6.3 3.4 5.6 2.4
138 6.4 3.1 5.5 1.8
139 6.0 3.0 4.8 1.8
140 6.9 3.1 5.4 2.1
141 6.7 3.1 5.6 2.4
142 6.9 3.1 5.1 2.3
143 5.8 2.7 5.1 1.9
144 6.8 3.2 5.9 2.3
145 6.7 3.3 5.7 2.5
146 6.7 3.0 5.2 2.3
147 6.3 2.5 5.0 1.9
148 6.5 3.0 5.2 2.0
149 6.2 3.4 5.4 2.3
150 5.9 3.0 5.1 1.8
As you can see it is split based on the classes factor and numeric.

Adding a space into every row in a column, with space position dependent on character length

I want to be add a white space into every row of one column in a data frame. This column is character in terms of data type. The position of this white space is dependent on the length of the string in each row.
e.g for all rows in this particular column, all rows with less than 6 characters should have the white space after the second character, whilst those with 7 or more characters should have the white space after the 4th character
As an example, looking at the Iris dataset and the Species column, for the setosa rows I would want a white space after the second character, so "setosa" becomes "se tosa"
I know that this will be an ifelse statement, but I'm not sure how to proceed
You can first determine the number of characters in iris$Species:
iris$Species_char <- nchar(as.character(iris$Species))
Based on this new column you can define an ifelse statement, with iris$Species_char <= 6 as your condition, the insertion of whitespace after the second character as action to be taken if condition evaluates to TRUE, and insertion of whitespace after the fourth character as action to be taken if condition evaluates to FALSE. To make sure the characters before and after the insertion point are recollected we use backreference, with \\1 referring back to the chars before, and \\2 referring back to the chars after the insertion point:
iris$Species <- ifelse(iris$Species_char <= 6,
sub("(\\w{2})(.*)", "\\1 \\2", iris$Species),
sub("(\\w{4})(.*)", "\\1 \\2", iris$Species))
The above two steps in one step:
iris$Species <- ifelse(nchar(iris$Species) <= 6,
sub("(\\w{2})(.*)", "\\1 \\2", iris$Species),
sub("(\\w{4})(.*)", "\\1 \\2", iris$Species))
EDIT: Using dplyr and stringr:
library(dplyr)
library(stringr)
iris %>%
mutate(Species = if_else(str_count(Species) <= 6, sub("(\\w{2})(.*)", "\\1 \\2", Species), sub("(\\w{4})(.*)", "\\1 \\2", Species)))
Result:
iris
Sepal.Length Sepal.Width Petal.Length Petal.Width Species Species_char
1 5.1 3.5 1.4 0.2 se tosa 6
2 4.9 3.0 1.4 0.2 se tosa 6
3 4.7 3.2 1.3 0.2 se tosa 6
4 4.6 3.1 1.5 0.2 se tosa 6
5 5.0 3.6 1.4 0.2 se tosa 6
6 5.4 3.9 1.7 0.4 se tosa 6
7 4.6 3.4 1.4 0.3 se tosa 6
8 5.0 3.4 1.5 0.2 se tosa 6
9 4.4 2.9 1.4 0.2 se tosa 6
10 4.9 3.1 1.5 0.1 se tosa 6
11 5.4 3.7 1.5 0.2 se tosa 6
12 4.8 3.4 1.6 0.2 se tosa 6
13 4.8 3.0 1.4 0.1 se tosa 6
14 4.3 3.0 1.1 0.1 se tosa 6
15 5.8 4.0 1.2 0.2 se tosa 6
16 5.7 4.4 1.5 0.4 se tosa 6
17 5.4 3.9 1.3 0.4 se tosa 6
18 5.1 3.5 1.4 0.3 se tosa 6
19 5.7 3.8 1.7 0.3 se tosa 6
20 5.1 3.8 1.5 0.3 se tosa 6
21 5.4 3.4 1.7 0.2 se tosa 6
22 5.1 3.7 1.5 0.4 se tosa 6
23 4.6 3.6 1.0 0.2 se tosa 6
24 5.1 3.3 1.7 0.5 se tosa 6
25 4.8 3.4 1.9 0.2 se tosa 6
26 5.0 3.0 1.6 0.2 se tosa 6
27 5.0 3.4 1.6 0.4 se tosa 6
28 5.2 3.5 1.5 0.2 se tosa 6
29 5.2 3.4 1.4 0.2 se tosa 6
30 4.7 3.2 1.6 0.2 se tosa 6
31 4.8 3.1 1.6 0.2 se tosa 6
32 5.4 3.4 1.5 0.4 se tosa 6
33 5.2 4.1 1.5 0.1 se tosa 6
34 5.5 4.2 1.4 0.2 se tosa 6
35 4.9 3.1 1.5 0.2 se tosa 6
36 5.0 3.2 1.2 0.2 se tosa 6
37 5.5 3.5 1.3 0.2 se tosa 6
38 4.9 3.6 1.4 0.1 se tosa 6
39 4.4 3.0 1.3 0.2 se tosa 6
40 5.1 3.4 1.5 0.2 se tosa 6
41 5.0 3.5 1.3 0.3 se tosa 6
42 4.5 2.3 1.3 0.3 se tosa 6
43 4.4 3.2 1.3 0.2 se tosa 6
44 5.0 3.5 1.6 0.6 se tosa 6
45 5.1 3.8 1.9 0.4 se tosa 6
46 4.8 3.0 1.4 0.3 se tosa 6
47 5.1 3.8 1.6 0.2 se tosa 6
48 4.6 3.2 1.4 0.2 se tosa 6
49 5.3 3.7 1.5 0.2 se tosa 6
50 5.0 3.3 1.4 0.2 se tosa 6
51 7.0 3.2 4.7 1.4 vers icolor 10
52 6.4 3.2 4.5 1.5 vers icolor 10
53 6.9 3.1 4.9 1.5 vers icolor 10
54 5.5 2.3 4.0 1.3 vers icolor 10
55 6.5 2.8 4.6 1.5 vers icolor 10
56 5.7 2.8 4.5 1.3 vers icolor 10
57 6.3 3.3 4.7 1.6 vers icolor 10
58 4.9 2.4 3.3 1.0 vers icolor 10
59 6.6 2.9 4.6 1.3 vers icolor 10
60 5.2 2.7 3.9 1.4 vers icolor 10
61 5.0 2.0 3.5 1.0 vers icolor 10
62 5.9 3.0 4.2 1.5 vers icolor 10
63 6.0 2.2 4.0 1.0 vers icolor 10
64 6.1 2.9 4.7 1.4 vers icolor 10
65 5.6 2.9 3.6 1.3 vers icolor 10
66 6.7 3.1 4.4 1.4 vers icolor 10
67 5.6 3.0 4.5 1.5 vers icolor 10
68 5.8 2.7 4.1 1.0 vers icolor 10
69 6.2 2.2 4.5 1.5 vers icolor 10
70 5.6 2.5 3.9 1.1 vers icolor 10
71 5.9 3.2 4.8 1.8 vers icolor 10
72 6.1 2.8 4.0 1.3 vers icolor 10
73 6.3 2.5 4.9 1.5 vers icolor 10
74 6.1 2.8 4.7 1.2 vers icolor 10
75 6.4 2.9 4.3 1.3 vers icolor 10
76 6.6 3.0 4.4 1.4 vers icolor 10
77 6.8 2.8 4.8 1.4 vers icolor 10
78 6.7 3.0 5.0 1.7 vers icolor 10
79 6.0 2.9 4.5 1.5 vers icolor 10
80 5.7 2.6 3.5 1.0 vers icolor 10
81 5.5 2.4 3.8 1.1 vers icolor 10
82 5.5 2.4 3.7 1.0 vers icolor 10
83 5.8 2.7 3.9 1.2 vers icolor 10
84 6.0 2.7 5.1 1.6 vers icolor 10
85 5.4 3.0 4.5 1.5 vers icolor 10
86 6.0 3.4 4.5 1.6 vers icolor 10
87 6.7 3.1 4.7 1.5 vers icolor 10
88 6.3 2.3 4.4 1.3 vers icolor 10
89 5.6 3.0 4.1 1.3 vers icolor 10
90 5.5 2.5 4.0 1.3 vers icolor 10
91 5.5 2.6 4.4 1.2 vers icolor 10
92 6.1 3.0 4.6 1.4 vers icolor 10
93 5.8 2.6 4.0 1.2 vers icolor 10
94 5.0 2.3 3.3 1.0 vers icolor 10
95 5.6 2.7 4.2 1.3 vers icolor 10
96 5.7 3.0 4.2 1.2 vers icolor 10
97 5.7 2.9 4.2 1.3 vers icolor 10
98 6.2 2.9 4.3 1.3 vers icolor 10
99 5.1 2.5 3.0 1.1 vers icolor 10
100 5.7 2.8 4.1 1.3 vers icolor 10
101 6.3 3.3 6.0 2.5 virg inica 9
102 5.8 2.7 5.1 1.9 virg inica 9
103 7.1 3.0 5.9 2.1 virg inica 9
104 6.3 2.9 5.6 1.8 virg inica 9
105 6.5 3.0 5.8 2.2 virg inica 9
106 7.6 3.0 6.6 2.1 virg inica 9
107 4.9 2.5 4.5 1.7 virg inica 9
108 7.3 2.9 6.3 1.8 virg inica 9
109 6.7 2.5 5.8 1.8 virg inica 9
110 7.2 3.6 6.1 2.5 virg inica 9
111 6.5 3.2 5.1 2.0 virg inica 9
112 6.4 2.7 5.3 1.9 virg inica 9
113 6.8 3.0 5.5 2.1 virg inica 9
114 5.7 2.5 5.0 2.0 virg inica 9
115 5.8 2.8 5.1 2.4 virg inica 9
116 6.4 3.2 5.3 2.3 virg inica 9
117 6.5 3.0 5.5 1.8 virg inica 9
118 7.7 3.8 6.7 2.2 virg inica 9
119 7.7 2.6 6.9 2.3 virg inica 9
120 6.0 2.2 5.0 1.5 virg inica 9
121 6.9 3.2 5.7 2.3 virg inica 9
122 5.6 2.8 4.9 2.0 virg inica 9
123 7.7 2.8 6.7 2.0 virg inica 9
124 6.3 2.7 4.9 1.8 virg inica 9
125 6.7 3.3 5.7 2.1 virg inica 9
126 7.2 3.2 6.0 1.8 virg inica 9
127 6.2 2.8 4.8 1.8 virg inica 9
128 6.1 3.0 4.9 1.8 virg inica 9
129 6.4 2.8 5.6 2.1 virg inica 9
130 7.2 3.0 5.8 1.6 virg inica 9
131 7.4 2.8 6.1 1.9 virg inica 9
132 7.9 3.8 6.4 2.0 virg inica 9
133 6.4 2.8 5.6 2.2 virg inica 9
134 6.3 2.8 5.1 1.5 virg inica 9
135 6.1 2.6 5.6 1.4 virg inica 9
136 7.7 3.0 6.1 2.3 virg inica 9
137 6.3 3.4 5.6 2.4 virg inica 9
138 6.4 3.1 5.5 1.8 virg inica 9
139 6.0 3.0 4.8 1.8 virg inica 9
140 6.9 3.1 5.4 2.1 virg inica 9
141 6.7 3.1 5.6 2.4 virg inica 9
142 6.9 3.1 5.1 2.3 virg inica 9
143 5.8 2.7 5.1 1.9 virg inica 9
144 6.8 3.2 5.9 2.3 virg inica 9
145 6.7 3.3 5.7 2.5 virg inica 9
146 6.7 3.0 5.2 2.3 virg inica 9
147 6.3 2.5 5.0 1.9 virg inica 9
148 6.5 3.0 5.2 2.0 virg inica 9
149 6.2 3.4 5.4 2.3 virg inica 9
150 5.9 3.0 5.1 1.8 virg inica 9

Matching elements of two lists of different sizes by their names

I have two lists of different sizes. One list (named * trees * ) is composed of phylogenetic trees (class phylo) and the second list (named * data_values*) is composed of numeric values.
The tips names of each phylogenetic tree of the list * tree* match with the names of each element inside of the list of values. But the list data_values is composed of a greater number of elements than the tips of each tree.
library(phytools)
library(ape)
#original tree:
tree_original = rtree(12, tip.label = paste0("species", LETTERS[1:12]))
##list of trees:
nodes = 14:23
trees = lapply(nodes,extract.clade,phy=tree_orignal)
names(trees) <- paste0("", 14:23)
data_values <- list()
for (i in 1:17) { data_values[[paste0('species', LETTERS[i])]] <- round(rnorm(10, 5, 4), 1) }
I would like to match both lists (trees and data_values) using species as an index to have a data frame for each tree (see example below). I can do this operation for each tree of the list trees individually but, as my list of species is much bigger than this example, I would like to know if I can do this operation (below) for the all list of trees and not run tree by tree, like this:
tree14 = data_values[match(trees$`14`$tip.label, names(data_values))]
tree14 = llply(tree14, function(x) sapply(x, as.numeric))
tree14_df = ldply(tree14, .fun=identity) **I will need each result as a data.frame**
.id 1 2 3 4 5 6 7 8 9 10
1 speciesE -0.5 3.4 2.0 5.3 3.7 8.2 3.5 -2.0 3.1 10.2
2 speciesL 6.8 4.3 7.1 5.5 4.9 2.5 0.3 -3.8 4.1 6.4
3 speciesA 2.5 2.5 9.6 10.6 2.2 7.1 4.1 4.4 6.0 6.7
4 speciesI -3.5 7.2 6.8 2.8 7.5 8.9 13.4 13.1 1.8 5.5
5 speciesC 4.3 2.2 10.0 7.4 4.4 8.3 -0.7 3.6 9.2 6.3
6 speciesH 6.3 6.1 2.2 4.6 7.4 7.3 2.9 0.6 3.0 5.2
7 speciesB 8.3 1.7 -0.1 4.5 9.4 -0.2 7.5 1.4 -0.3 4.6
8 speciesD 6.2 5.8 6.6 1.1 5.4 11.1 -1.1 0.0 7.9 0.4
9 speciesG 3.5 2.8 1.4 11.6 -2.8 11.0 3.5 2.8 3.1 4.8
10 speciesK 0.9 4.9 5.4 2.7 -0.7 5.1 18.3 4.9 2.5 -0.7
tree15 = data_values[match(trees$`15`$tip.label, names(data_values))]
tree15 = llply(tree15, function(x) sapply(x, as.numeric))
tree15_df = ldply(tree15, .fun=identity)
.id 1 2 3 4 5 6 7 8 9 10
1 speciesE -0.5 3.4 2.0 5.3 3.7 8.2 3.5 -2.0 3.1 10.2
2 speciesL 6.8 4.3 7.1 5.5 4.9 2.5 0.3 -3.8 4.1 6.4
3 speciesA 2.5 2.5 9.6 10.6 2.2 7.1 4.1 4.4 6.0 6.7
4 speciesI -3.5 7.2 6.8 2.8 7.5 8.9 13.4 13.1 1.8 5.5
5 speciesC 4.3 2.2 10.0 7.4 4.4 8.3 -0.7 3.6 9.2 6.3
6 speciesH 6.3 6.1 2.2 4.6 7.4 7.3 2.9 0.6 3.0 5.2
7 speciesB 8.3 1.7 -0.1 4.5 9.4 -0.2 7.5 1.4 -0.3 4.6
... this operation goes until tree23

How to animate stroke-dashoffset with SVG animate?

To animate stroke-dashoffset I am aware of using CSS #keyframes to move the stroke-dashoffset of a SVG path. However, because I want to size the SVG with background-size: cover, I am unable to target the individual elements inside the SVG since it's being referenced as a background-image in CSS.
Is there a way to use SVG's built-in <animate /> tags to animate stroke-dashoffset?
Lion head animation example
Animation of drawing lines from zero to maximum value is implemented by changing the stroke-dashoffset from maximum to zero.
attributeName="stroke-dashoffset"
begin="0.1s;f1.end+0.4s"
values="2037;0;2037"
dur="15s"
calcMode="linear"
/>
A second animation has been added - filling with a color that starts after the animation of drawing lines is completed.
<animate id="f1"
attributeName="fill"
begin="p1.end+0.4s"
dur="10s"
values="#FCFCFC;#A9A9A9;black;#A9A9A9;#FCFCFC"
/>
Drawing and erasing lines is accomplished using the attribute:
values="2037;0;2037"
.txt {
font-size:1.2em;
color:gray;
}
h1 {
text-align: center;
}
.lion {
padding:0.25em;
margin-left:-1.5em;
float:left;
}
<body>
<h1>Lion</h1>
<div class="lion">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
width="200" height="200" viewBox="-30 85 600 600"
style="border:0px dotted red;">
<title>The animation is drawing lines</title>
<g transform="scale(0.85) ">
<path class="path" fill="none" stroke-width="2" stroke ="black" stroke-dasharray= "2000" stroke-dashoffset="2000" d="m272.2 113.6c-0.3 0-0.6 0-0.9 0.1-0.7 0.1 2.2 2.5 10.9 11.2 9.8 9.7 18.2 19.1 23 25.5 5.9 8.1 12.3 18.6 16.4 29.1 0.8 1.6 3.6 11.9 4.6 16.9 0.5 2.8 1 5.4 1.2 5.8 0.8 2.5 3.9-8.4 4.8-13 1.2-5.6 1.2-11.4 1-17.1-0.2-5.8-0.5-11.8-2.2-17.4-1.4-4.8-3.6-9.4-6.7-13.3-6.6-8.2-15.1-15.1-24.4-20.1-6.4-3.5-13.8-4.9-20.9-6.5-2.2-0.5-4.8-1.3-6.9-1.2zm194.7 0c-2.1 0-4.7 0.7-6.9 1.2-7.1 1.6-14.5 3.1-20.9 6.5-9.3 5-17.8 11.8-24.4 20.1-3.1 3.9-5.3 8.6-6.7 13.3-1.7 5.6-2 11.5-2.2 17.4-0.2 5.7-0.1 11.5 1 17.1 1 4.5 4 15.4 4.8 13 0.1-0.3 0.6-2.9 1.2-5.8 0.9-5 3.7-15.3 4.6-16.9 4.2-10.5 10.5-21 16.5-29.1 4.8-6.5 13.2-15.8 23-25.5 8.7-8.7 11.6-11.1 10.9-11.2-0.3 0-0.6-0.1-0.9-0.1zm-97.3 24.5c-0.8-0.1-1.4 5.7-2 8.5-0.9 4.3-1.3 8.7-2.4 12.9-1.8 6.9-4.3 13.7-7.1 20.3-2.4 5.7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 0-1.3 0-2.6-0.1z">
<animate id="p1"
attributeName="stroke-dashoffset"
begin="0.1s;f1.end+0.4s"
values="2037;0;2037"
dur="15s"
calcMode="linear"
/>
<animate id="f1"
attributeName="fill"
begin="p1.end+0.4s"
dur="10s"
values="#FCFCFC;#A9A9A9;black;#A9A9A9;#FCFCFC"
/>
</path>
</g>
</svg>
</div>
<div class="txt">
<p> The lion (Panthera leo) is a species in the family Felidae; it is a muscular, deep-chested cat with a short, rounded head, a reduced neck and round ears, and a hairy tuft at the end of its tail. The lion is sexually dimorphic; males are larger than females with a typical weight range of 150 to 250 kg (330 to 550 lb) for males and 120 to 182 kg (265 to 400 lb) for females. Male lions have a prominent mane, which is the most recognisable feature of the species. A lion pride consists of a few adult males, related females and cubs. Groups of female lions typically hunt together, preying mostly on large ungulates. The species is an apex and keystone predator, although they scavenge when opportunities occur. Some lions have been known to hunt humans, although the species typically does not.</p>
<p>Typically, the lion inhabits grasslands and savannas but is absent in dense forests. It is usually more diurnal than other big cats, but when persecuted it adapts to being active at night and at twilight. In the Pleistocene, the lion ranged throughout Eurasia, Africa and North America but today it has been reduced to fragmented populations in Sub-Saharan Africa and one critically endangered population in western India. It has been listed as Vulnerable on the IUCN Red List since 1996 because populations in African countries have declined by about 43% since the early 1990s. Lion populations are untenable outside designated protected areas. Although the cause of the decline is not fully understood, habitat loss and conflicts with humans are the greatest causes for concern.</p>
<p>One of the most widely recognised animal symbols in human culture, the lion has been extensively depicted in sculptures and paintings, on national flags, and in contemporary films and literature. Lions have been kept in menageries since the time of the Roman Empire and have been a key species sought for exhibition in zoological gardens across the world since the late 18th century. Cultural depictions of lions were prominent in the Upper Paleolithic period; carvings and paintings from the Lascaux and Chauvet Caves in France have been dated to 17,000 years ago, and depictions have occurred in virtually all ancient and medieval cultures that coincided with the lion's former and current ranges.is not fully understood, habitat loss and conflicts with humans are the greatest causes for concern. </p>
wikipedia.org
</div>
</body>
I found the answer. You insert the <animate /> tag within the path.
<path stroke-dashoffset="200" stroke-dasharray="200 30" stroke-width="2" stroke="#333" d="...">
<animate attributeName="stroke-dashoffset" values="0 2000" dur="5s" repeatCount="indefinite" />
</path>

Resources