How to manipulate character string for conditional rows

It follows the original post here: how to read file with uneven number of columns in R, but I think that it may be better to find a solution with a different topic.

The file starts from the first row, if the 2nd number on row1 is 2, then the following 2 lines after "10112 2" belong to unit 10112. Then in the 4th row, the 2nd number is 5, so the following 5 rows after "10114 5" belong to unit 10114. Then next, in the row "10115 6", the 2nd number is 6, so the following 6 numbers belong to unit 10115, etc. The rows go on like this.

I want to do something for each whole unit, for example like this in the desired_output -Copy each unit to two more units and change the unit code for each copy. But it has to recognize the unit code first. The unit code is the first column in the rows with only two numbers, such as 10112, 10114, 10115 in sample. So how to do it in R? Thanks for your help.

sample<- "10112 2
1 0.1 0.6 0.3
7.07 2.01 0.26 0.13 4.68 0.56 0.96 1.28
10114 5
1 0.2 0.3 0.5
9.78 8.64 8.33 7.6 10.57 7.16 9.05 8.58
2 0.3 0.4 0.3
4.95 5.91 4.01 3.82 5.94 4.41 3.53 5.8
1.4 0.67 5.22 0.96 1.23 2.52 1.36 4.81
10115 6
1 0.2 0.4 0.4
10.06 10.47 8.29 9.54 11.11 9.22 9 9.89
2 0.3 0.5 0.2
6.14 3.2 0.9 4.72 5.06 4.22 1.29 2.38
2 0.2 0.2 0.6
9.49 8.51 9.67 7.92 10.19 9.14 8.96 8.64"

desired_output <- "101121 2
1 0.1 0.6 0.3
7.07 2.01 0.26 0.13 4.68 0.56 0.96 1.28
101122 2
1 0.1 0.6 0.3
7.07 2.01 0.26 0.13 4.68 0.56 0.96 1.28
101141 5
1 0.2 0.3 0.5
9.78 8.64 8.33 7.6 10.57 7.16 9.05 8.58
2 0.3 0.4 0.3
4.95 5.91 4.01 3.82 5.94 4.41 3.53 5.8
1.4 0.67 5.22 0.96 1.23 2.52 1.36 4.81
101142 5
1 0.2 0.3 0.5
9.78 8.64 8.33 7.6 10.57 7.16 9.05 8.58
2 0.3 0.4 0.3
4.95 5.91 4.01 3.82 5.94 4.41 3.53 5.8
1.4 0.67 5.22 0.96 1.23 2.52 1.36 4.81
101151 6
1 0.2 0.4 0.4
10.06 10.47 8.29 9.54 11.11 9.22 9 9.89
2 0.3 0.5 0.2
6.14 3.2 0.9 4.72 5.06 4.22 1.29 2.38
2 0.2 0.2 0.6
9.49 8.51 9.67 7.92 10.19 9.14 8.96 8.64
101152 6
1 0.2 0.4 0.4
10.06 10.47 8.29 9.54 11.11 9.22 9 9.89
2 0.3 0.5 0.2
6.14 3.2 0.9 4.72 5.06 4.22 1.29 2.38
2 0.2 0.2 0.6
9.49 8.51 9.67 7.92 10.19 9.14 8.96 8.64"

I think one way is that I can manually copy two files from 'sample', and then to create a list c(10112, 10114, 10115, etc.) with all the unit code. Then to do two steps, 1st step is to change c(10112, 10114, 10115, etc.) to c(101121, 101141, 101151, etc.) in the 1st copy, 2nd step is to change c(10112, 10114, 10115, etc.) to c(101122, 101142, 101152, etc.) in the 2nd copy. And then manually rbind the two copies together. But I do not know how to detect the unit code and then to change the corresponding values. There are many unit code so it is impossible to do it manually. I just begin to learn that the file "sample" or the resulting output "desired_output" all belong to character string.
Thanks for your help.

...still waiting for a solution. The question becomes: how to replace 10112, 10114, 10115 with 101121, 101141, 101151 in the file? Is it possible to convert each element in the file to a numeric value, so that I can locate and find the unit IDs. I'm familiar with dataframe, but not such file. Thanks.

A little clarification first, your sample is a character string, it doesn't have rows, it has lines and it is not a file, it is an object in memory (BTW a dataframe is also not a file)

This code produces the result you are describing

library(stringr)

sample <- "10112 2
1 0.1 0.6 0.3
7.07 2.01 0.26 0.13 4.68 0.56 0.96 1.28
10114 5
1 0.2 0.3 0.5
9.78 8.64 8.33 7.6 10.57 7.16 9.05 8.58
2 0.3 0.4 0.3
4.95 5.91 4.01 3.82 5.94 4.41 3.53 5.8
1.4 0.67 5.22 0.96 1.23 2.52 1.36 4.81
10115 6
1 0.2 0.4 0.4
10.06 10.47 8.29 9.54 11.11 9.22 9 9.89
2 0.3 0.5 0.2
6.14 3.2 0.9 4.72 5.06 4.22 1.29 2.38
2 0.2 0.2 0.6
9.49 8.51 9.67 7.92 10.19 9.14 8.96 8.64"

unit_ids <- as.vector(str_extract_all(sample, "\\d{5}", simplify = TRUE))
new_ids <- paste0(unit_ids,1)
replacement <- setNames(new_ids, unit_ids)
str_replace_all(sample, replacement)
#> [1] "101121 2\n1 0.1 0.6 0.3\n7.07 2.01 0.26 0.13 4.68 0.56 0.96 1.28\n101141 5\n1 0.2 0.3 0.5\n9.78 8.64 8.33 7.6 10.57 7.16 9.05 8.58\n2 0.3 0.4 0.3\n4.95 5.91 4.01 3.82 5.94 4.41 3.53 5.8\n1.4 0.67 5.22 0.96 1.23 2.52 1.36 4.81\n101151 6\n1 0.2 0.4 0.4\n10.06 10.47 8.29 9.54 11.11 9.22 9 9.89\n2 0.3 0.5 0.2\n6.14 3.2 0.9 4.72 5.06 4.22 1.29 2.38\n2 0.2 0.2 0.6\n9.49 8.51 9.67 7.92 10.19 9.14 8.96 8.64"

Created on 2019-09-28 by the reprex package (v0.3.0.9000)

Thanks, it works perfectly. I want to ask that what does this mean? Why there are many "" in the unit_ids I worked on my data.

str_extract_all(sample, "\d{5}", simplify = TRUE)

Second, how to export it as a file with the format and space similar to "sample"?

1 Like

Also, in my file, I read it using scan() function, and found that the lines display as this below. So it seems not proper to use the code you provide, so how to do with this? Thanks.

head(data1)
[1] "10112 5"
[2] "7 0.049 0.30 0.60 0.70 0.40"
[3] "0.351 0.279 0.317 0.392 1.095 3.009 3.259 2.593 1.005 0.397 0.385 0.397"
[4] "8 0.047 0.30 0.70 0.70 0.30"
[5] "0.225 0.287 0.400 0.475 0.263 0.575 1.575 1.263 0.475 0.200 0.200 0.213"
[6] "9 0.087 0.30 0.70 0.70 0.30"

To avoid unnecessary backs and forths, could you provide a proper REPRoducible EXample (reprex) illustrating your issue?

Thanks for your insights, but your solution is more complicated than what I would need. I read the file using scan(file=(), what=character(), sep='\n'), and got the first 10 lines like this. I want to obtain a file and save the output like data2. That is to say, I want to copy unit 10112 as 101121 and 101122, and to copy unit 10114 as 101141 and 101142. So each unit will have two new sub-units, with the same values, but just different unit code.
Forgive me-I am not familiar with character string, so I could not write the code, just copy data here. Thanks for your help.

data1
[1] "10112 5"
[2] "7 0.049 0.30 0.60 0.70 0.40"
[3] "0.351 0.279 0.317 0.392 1.095 3.009 3.259 2.593 1.005 0.397 0.385 0.397"
[4] "8 0.047 0.30 0.70 0.70 0.30"
[5] "0.225 0.287 0.400 0.475 0.263 0.575 1.575 1.263 0.475 0.200 0.200 0.213"
[6] "9 0.087 0.30 0.70 0.70 0.30"
[7] "10114 3"
[8] "7 0.049 0.30 0.60 0.70 0.40"
[9] "0.351 0.279 0.317 0.392 1.095 3.009 3.259 2.593 1.005 0.397 0.385 0.397"
[10] "0.225 0.287 0.400 0.475 0.263 0.575 1.575 1.263 0.475 0.200 0.200 0.213"

data2
[1] "101121 5"
[2] "7 0.049 0.30 0.60 0.70 0.40"
[3] "0.351 0.279 0.317 0.392 1.095 3.009 3.259 2.593 1.005 0.397 0.385 0.397"
[4] "8 0.047 0.30 0.70 0.70 0.30"
[5] "0.225 0.287 0.400 0.475 0.263 0.575 1.575 1.263 0.475 0.200 0.200 0.213"
[6] "9 0.087 0.30 0.70 0.70 0.30"
[7] "101122 5"
[8] "7 0.049 0.30 0.60 0.70 0.40"
[9] "0.351 0.279 0.317 0.392 1.095 3.009 3.259 2.593 1.005 0.397 0.385 0.397"
[10] "8 0.047 0.30 0.70 0.70 0.30"
[11] "0.225 0.287 0.400 0.475 0.263 0.575 1.575 1.263 0.475 0.200 0.200 0.213"
[12] "9 0.087 0.30 0.70 0.70 0.30"
[13] "101141 3"
[14] "7 0.049 0.30 0.60 0.70 0.40"
[15] "0.351 0.279 0.317 0.392 1.095 3.009 3.259 2.593 1.005 0.397 0.385 0.397"
[16] "0.225 0.287 0.400 0.475 0.263 0.575 1.575 1.263 0.475 0.200 0.200 0.213"
[17] "101142 3"
[18] "7 0.049 0.30 0.60 0.70 0.40"
[19] "0.351 0.279 0.317 0.392 1.095 3.009 3.259 2.593 1.005 0.397 0.385 0.397"
[20] "0.225 0.287 0.400 0.475 0.263 0.575 1.575 1.263 0.475 0.200 0.200 0.213"

What you are showing now is not a character string, is a dataframe, so please go through the link I gave you, and provide a proper reproducible example.

Okay, here is the example and my code:
library(stringr)

sample <- "10112 2
1 0.1 0.6 0.3
7.07 2.01 0.26 0.13 4.68 0.56 0.96 1.28
10114 5
1 0.2 0.3 0.5
9.78 8.64 8.33 7.6 10.57 7.16 9.05 8.58
2 0.3 0.4 0.3
4.95 5.91 4.01 3.82 5.94 4.41 3.53 5.8
1.4 0.67 5.22 0.96 1.23 2.52 1.36 4.81
10115 6
1 0.2 0.4 0.4
10.06 10.47 8.29 9.54 11.11 9.22 9 9.89
2 0.3 0.5 0.2
6.14 3.2 0.9 4.72 5.06 4.22 1.29 2.38
2 0.2 0.2 0.6
9.49 8.51 9.67 7.92 10.19 9.14 8.96 8.64"

read_the_text <- scan(text = sample,
what = character(),
sep = "\n"); read_the_text

unit_ids <- as.vector(str_extract_all(sample, "\d{5}", simplify = TRUE))
new_ids <- paste0(unit_ids,1)
replacement <- setNames(new_ids, unit_ids)
final_result <- str_replace_all(sample, replacement)

to print to file

sink(file = "~/output.txt")
invisible(x = mapply(FUN = cat, sep = "\n", names(x = final_result), final_result))
sink()

But it threw the error, so what's wrong with it? Thanks.

Error in mapply(FUN = cat, sep = "\n", names(x = final_result), final_result) :
zero-length inputs cannot be mixed with those of non-zero length

Please use proper code formatting when posting, here is how to do it

This produces the desired output

library(stringr)

sample <- "10112 2
1 0.1 0.6 0.3
7.07 2.01 0.26 0.13 4.68 0.56 0.96 1.28
10114 5
1 0.2 0.3 0.5
9.78 8.64 8.33 7.6 10.57 7.16 9.05 8.58
2 0.3 0.4 0.3
4.95 5.91 4.01 3.82 5.94 4.41 3.53 5.8
1.4 0.67 5.22 0.96 1.23 2.52 1.36 4.81
10115 6
1 0.2 0.4 0.4
10.06 10.47 8.29 9.54 11.11 9.22 9 9.89
2 0.3 0.5 0.2
6.14 3.2 0.9 4.72 5.06 4.22 1.29 2.38
2 0.2 0.2 0.6
9.49 8.51 9.67 7.92 10.19 9.14 8.96 8.64"

read_the_text <- scan(text = sample,
                      what = character(),
                      sep = "\n"); read_the_text

unit_ids <- as.vector(str_extract_all(sample, "\\d{5}", simplify = TRUE))
new_ids <- paste0(unit_ids,1)
replacement <- setNames(new_ids, unit_ids)
final_result <- str_replace_all(sample, replacement)

sink(file = "~/output.txt")
invisible(x = mapply(FUN = cat, sep = "\n", final_result))
sink()

output.txt content

101121 2
1 0.1 0.6 0.3
7.07 2.01 0.26 0.13 4.68 0.56 0.96 1.28
101141 5
1 0.2 0.3 0.5
9.78 8.64 8.33 7.6 10.57 7.16 9.05 8.58
2 0.3 0.4 0.3
4.95 5.91 4.01 3.82 5.94 4.41 3.53 5.8
1.4 0.67 5.22 0.96 1.23 2.52 1.36 4.81
101151 6
1 0.2 0.4 0.4
10.06 10.47 8.29 9.54 11.11 9.22 9 9.89
2 0.3 0.5 0.2
6.14 3.2 0.9 4.72 5.06 4.22 1.29 2.38
2 0.2 0.2 0.6
9.49 8.51 9.67 7.92 10.19 9.14 8.96 8.64

Thanks, I will learn it properly. But I found a problem. This does not use "read_the_text", just "sample" to extract key words. My file format is like "read_the_text", so when I replace "sample" to "read_the_text", there are many "" in the result.

library(stringr)

sample <- "10112 2
1 0.1 0.6 0.3
7.07 2.01 0.26 0.13 4.68 0.56 0.96 1.28
10114 5
1 0.2 0.3 0.5
9.78 8.64 8.33 7.6 10.57 7.16 9.05 8.58
2 0.3 0.4 0.3
4.95 5.91 4.01 3.82 5.94 4.41 3.53 5.8
1.4 0.67 5.22 0.96 1.23 2.52 1.36 4.81
10115 6
1 0.2 0.4 0.4
10.06 10.47 8.29 9.54 11.11 9.22 9 9.89
2 0.3 0.5 0.2
6.14 3.2 0.9 4.72 5.06 4.22 1.29 2.38
2 0.2 0.2 0.6
9.49 8.51 9.67 7.92 10.19 9.14 8.96 8.64"

read_the_text <- scan(text = sample,
                      what = character(),
                      sep = "\n"); read_the_text

unit_ids <- as.vector(str_extract_all(read_the_text, "\\d{5}", simplify = TRUE))

new_ids <- paste0(unit_ids,1)
replacement <- setNames(new_ids, unit_ids)
final_result <- str_replace_all(sample, replacement)

sink(file = "~/output.txt")
invisible(x = mapply(FUN = cat, sep = "\n", final_result))
sink()

Then "unit_ids" becomes

unit_ids
[1] "10112" "" "" "10114" "" "" "" ""
[9] "" "10115" "" "" "" "" "" ""

Well, that is the code you provided as a reprex, if the code you provide doesn't reproduce your issue then is not a proper reprex.

You can solve the problem by removing the empty elements, like this

library(stringr)

sample <- "10112 2
1 0.1 0.6 0.3
7.07 2.01 0.26 0.13 4.68 0.56 0.96 1.28
10114 5
1 0.2 0.3 0.5
9.78 8.64 8.33 7.6 10.57 7.16 9.05 8.58
2 0.3 0.4 0.3
4.95 5.91 4.01 3.82 5.94 4.41 3.53 5.8
1.4 0.67 5.22 0.96 1.23 2.52 1.36 4.81
10115 6
1 0.2 0.4 0.4
10.06 10.47 8.29 9.54 11.11 9.22 9 9.89
2 0.3 0.5 0.2
6.14 3.2 0.9 4.72 5.06 4.22 1.29 2.38
2 0.2 0.2 0.6
9.49 8.51 9.67 7.92 10.19 9.14 8.96 8.64"

read_the_text <- scan(text = sample,
                      what = character(),
                      sep = "\n"); read_the_text

unit_ids <- as.vector(str_extract_all(read_the_text, "\\d{5}", simplify = TRUE))
unit_ids <- unit_ids[unit_ids != ""]

new_ids <- paste0(unit_ids,1)

replacement <- setNames(new_ids, unit_ids)

final_result <- str_replace_all(read_the_text, replacement)

sink(file = "~/output.txt")
invisible(x = mapply(FUN = cat, sep = "\n", final_result))
sink()

Thanks, this is cool. I want to ask that where to find information about string rules, such as above?

That is called "regular expressions" and it is used to describe text patterns.
You can find a lot of free information on the internet if you search for that term but if you are looking for a book I would recommend this one.

This problem has not solved yet, because the order does not match up. For each group unit number (10112 and 10114 in this case), I tried to copy to three more sub-units, adding one more number to the ID, 1,2, 3. (for example, 101121, 101122, 101123, 101141, 101142, 101143, and the same for the other group unit numbers) And then, I want to concatenate the three sub-units by order.

I made a smaller sample and my code below to explain the problem and my intended outcome. Thanks for any help.

library(stringr)

sample <- "10112 2
1 0.1 0.6 0.3
7.07 2.01 0.26 0.13 4.68 0.56 0.96 1.28
10114 5
1 0.2 0.3 0.5
9.78 8.64 8.33 7.6 10.57 7.16 9.05 8.58
2 0.3 0.4 0.3
4.95 5.91 4.01 3.82 5.94 4.41 3.53 5.8
1.4 0.67 5.22 0.96 1.23 2.52 1.36 4.81"

read_the_text <- scan(text = sample,
                      what = character(),
                      sep = "\n"); read_the_text

unit_ids <- as.vector(str_extract_all(read_the_text, "\\d{5}", simplify = TRUE))
unit_ids <- unit_ids[unit_ids != ""]

# add 1 to each unit id
new_ids1 <- paste0(unit_ids,1)
replacement1 <- setNames(new_ids1, unit_ids)
final_result1 <- str_replace_all(read_the_text, replacement1)
sink(file = "~/output1.txt")
invisible(x = mapply(FUN = cat, sep = "\n", final_result1))
sink()

# add 2 to each unit id
new_ids2 <- paste0(unit_ids,2)
replacement2 <- setNames(new_ids2, unit_ids)
final_result2 <- str_replace_all(read_the_text, replacement2)
sink(file = "~/output2.txt")
invisible(x = mapply(FUN = cat, sep = "\n", final_result2))
sink()

# add 3 to each unit id
new_ids3 <- paste0(unit_ids,3)
replacement3 <- setNames(new_ids3, unit_ids)
final_result3 <- str_replace_all(read_the_text, replacement3)
sink(file = "~/output3.txt")
invisible(x = mapply(FUN = cat, sep = "\n", final_result3))
sink()

Then I manually concatenated the three files one after another in a text editor, as I didn't know how to do it in R.

The outcome is like this:

outcome.concatenate <- "101121 2
1 0.1 0.6 0.3
7.07 2.01 0.26 0.13 4.68 0.56 0.96 1.28
101141 5
1 0.2 0.3 0.5
9.78 8.64 8.33 7.6 10.57 7.16 9.05 8.58
2 0.3 0.4 0.3
4.95 5.91 4.01 3.82 5.94 4.41 3.53 5.8
1.4 0.67 5.22 0.96 1.23 2.52 1.36 4.81
101122 2
1 0.1 0.6 0.3
7.07 2.01 0.26 0.13 4.68 0.56 0.96 1.28
101142 5
1 0.2 0.3 0.5
9.78 8.64 8.33 7.6 10.57 7.16 9.05 8.58
2 0.3 0.4 0.3
4.95 5.91 4.01 3.82 5.94 4.41 3.53 5.8
1.4 0.67 5.22 0.96 1.23 2.52 1.36 4.81
101123 2
1 0.1 0.6 0.3
7.07 2.01 0.26 0.13 4.68 0.56 0.96 1.28
101143 5
1 0.2 0.3 0.5
9.78 8.64 8.33 7.6 10.57 7.16 9.05 8.58
2 0.3 0.4 0.3
4.95 5.91 4.01 3.82 5.94 4.41 3.53 5.8
1.4 0.67 5.22 0.96 1.23 2.52 1.36 4.81
"

But what I wanted is like this:
intended.outcome <- "101121 2
1 0.1 0.6 0.3
7.07 2.01 0.26 0.13 4.68 0.56 0.96 1.28
101122 2
1 0.1 0.6 0.3
7.07 2.01 0.26 0.13 4.68 0.56 0.96 1.28
101123 2
1 0.1 0.6 0.3
7.07 2.01 0.26 0.13 4.68 0.56 0.96 1.28
101141 5
1 0.2 0.3 0.5
9.78 8.64 8.33 7.6 10.57 7.16 9.05 8.58
2 0.3 0.4 0.3
4.95 5.91 4.01 3.82 5.94 4.41 3.53 5.8
1.4 0.67 5.22 0.96 1.23 2.52 1.36 4.81
101142 5
1 0.2 0.3 0.5
9.78 8.64 8.33 7.6 10.57 7.16 9.05 8.58
2 0.3 0.4 0.3
4.95 5.91 4.01 3.82 5.94 4.41 3.53 5.8
1.4 0.67 5.22 0.96 1.23 2.52 1.36 4.81
101143 5
1 0.2 0.3 0.5
9.78 8.64 8.33 7.6 10.57 7.16 9.05 8.58
2 0.3 0.4 0.3
4.95 5.91 4.01 3.82 5.94 4.41 3.53 5.8
1.4 0.67 5.22 0.96 1.23 2.52 1.36 4.81
"

Could you help with this problem? In my file, there are more than 1000 group units, so it is impossible to concatenate them manually. Thanks very much.

This produces the output you are describing now but please, make up your mind about the desired output since you are constantly changing it.

library(tidyverse)

sample <- "10112 2
1 0.1 0.6 0.3
7.07 2.01 0.26 0.13 4.68 0.56 0.96 1.28
10114 5
1 0.2 0.3 0.5
9.78 8.64 8.33 7.6 10.57 7.16 9.05 8.58
2 0.3 0.4 0.3
4.95 5.91 4.01 3.82 5.94 4.41 3.53 5.8
1.4 0.67 5.22 0.96 1.23 2.52 1.36 4.81"

read_the_text <- scan(text = sample,
                      what = character(),
                      sep = "\n"); read_the_text

final_result <- data.frame(text = read_the_text) %>% 
    mutate(unit_id = str_extract(text, "^\\d{5}")) %>%
    fill(unit_id, .direction = "down") %>% 
    group_by(unit_id) %>% 
    summarise(text = str_remove(paste(text, collapse = "\n"), "^\\d{5}")) %>% 
    group_by(unit_id) %>% 
    mutate(count = 3) %>% 
    expand(count = 1:count, text) %>% 
    mutate(text = paste(paste0(unit_id, count), text)) %>% 
    pull(text)

sink(file = "~/output.txt")
invisible(x = mapply(FUN = cat, sep = "\n", final_result))
sink()

output.txt

101121 2
1 0.1 0.6 0.3
7.07 2.01 0.26 0.13 4.68 0.56 0.96 1.28
101122 2
1 0.1 0.6 0.3
7.07 2.01 0.26 0.13 4.68 0.56 0.96 1.28
101123 2
1 0.1 0.6 0.3
7.07 2.01 0.26 0.13 4.68 0.56 0.96 1.28
101141 5
1 0.2 0.3 0.5
9.78 8.64 8.33 7.6 10.57 7.16 9.05 8.58
2 0.3 0.4 0.3
4.95 5.91 4.01 3.82 5.94 4.41 3.53 5.8
1.4 0.67 5.22 0.96 1.23 2.52 1.36 4.81
101142 5
1 0.2 0.3 0.5
9.78 8.64 8.33 7.6 10.57 7.16 9.05 8.58
2 0.3 0.4 0.3
4.95 5.91 4.01 3.82 5.94 4.41 3.53 5.8
1.4 0.67 5.22 0.96 1.23 2.52 1.36 4.81
101143 5
1 0.2 0.3 0.5
9.78 8.64 8.33 7.6 10.57 7.16 9.05 8.58
2 0.3 0.4 0.3
4.95 5.91 4.01 3.82 5.94 4.41 3.53 5.8
1.4 0.67 5.22 0.96 1.23 2.52 1.36 4.81

Thanks! A big help. I thought to simplify the question and to do it outside of R, but it seems impossible.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.