cycle through list to match value with multiple matches possible
I am interested in cycling through a list of diagnosis codes and populating a new variable with a previously calculated risk score if the value matches, and if there are multiple matches populate the new variable with the highest risk score.
I am hoping to take the long form of the original data set and for each ID match the proc number with the highest risk score and store both the proc number and risk score in separate variables.
I have some experience using if loops to do similar things in wide data, but cannot figure out how to do it this way. I have no experience matching and then storing the highest value, so don't even know where to start with this.
Data to see what I am getting at:
Here is the data from for the diagnosis codes
dz <-c("disease_1", "disease_2", "disease_3", "disease_4")
code <-c(124, 546, 890, 898)
risk_score <-c(10, 122, 45, 98)
df <-data.frame(dz, code, risk_score)
And the simulated data set I am interested in
id <- c(1,1,1,2,2,2,2,3,3,4,4,4,4,4,4,5,5,5)
proc <-c(244,546,234,345,890,123,434,634,233,345,124,234,634,546,789,890,567,124)
proc<-as.character(proc)
data<-data.frame(id, proc)
so what I want to achieve is something like this
id<-c(1,2,3,4,5)
code_match<-c(546,890,124,546,890)
highest_risk_score <-c(122,45,10,122,45)
output_df<-data.frame(id, code_match, highest_risk_score)
with this output
id code_match highest_risk_score
1 1 546 122
2 2 890 45
3 3 124 10
4 4 546 122
5 5 890 45
with id being the identifier, the code_match being the code with the highest risk score, and the highest_risk_score being the value of the risk score (the highest value for that id).
r
add a comment |
I am interested in cycling through a list of diagnosis codes and populating a new variable with a previously calculated risk score if the value matches, and if there are multiple matches populate the new variable with the highest risk score.
I am hoping to take the long form of the original data set and for each ID match the proc number with the highest risk score and store both the proc number and risk score in separate variables.
I have some experience using if loops to do similar things in wide data, but cannot figure out how to do it this way. I have no experience matching and then storing the highest value, so don't even know where to start with this.
Data to see what I am getting at:
Here is the data from for the diagnosis codes
dz <-c("disease_1", "disease_2", "disease_3", "disease_4")
code <-c(124, 546, 890, 898)
risk_score <-c(10, 122, 45, 98)
df <-data.frame(dz, code, risk_score)
And the simulated data set I am interested in
id <- c(1,1,1,2,2,2,2,3,3,4,4,4,4,4,4,5,5,5)
proc <-c(244,546,234,345,890,123,434,634,233,345,124,234,634,546,789,890,567,124)
proc<-as.character(proc)
data<-data.frame(id, proc)
so what I want to achieve is something like this
id<-c(1,2,3,4,5)
code_match<-c(546,890,124,546,890)
highest_risk_score <-c(122,45,10,122,45)
output_df<-data.frame(id, code_match, highest_risk_score)
with this output
id code_match highest_risk_score
1 1 546 122
2 2 890 45
3 3 124 10
4 4 546 122
5 5 890 45
with id being the identifier, the code_match being the code with the highest risk score, and the highest_risk_score being the value of the risk score (the highest value for that id).
r
you are correct
– Tim Feeney
Nov 25 '18 at 20:51
It's true, because I am not interested in those codes. the data I am working with will have multiple codes per ID that I have no interest in.
– Tim Feeney
Nov 25 '18 at 21:00
correct, because I don't know how to do it. I thought an example of the output I am interested in would illustrate what I am hoping to achieve.
– Tim Feeney
Nov 25 '18 at 21:02
Not sure why all the-1s today but I ticked it back to 0. This had code + data and was reproducible.
– hrbrmstr
Nov 26 '18 at 0:23
add a comment |
I am interested in cycling through a list of diagnosis codes and populating a new variable with a previously calculated risk score if the value matches, and if there are multiple matches populate the new variable with the highest risk score.
I am hoping to take the long form of the original data set and for each ID match the proc number with the highest risk score and store both the proc number and risk score in separate variables.
I have some experience using if loops to do similar things in wide data, but cannot figure out how to do it this way. I have no experience matching and then storing the highest value, so don't even know where to start with this.
Data to see what I am getting at:
Here is the data from for the diagnosis codes
dz <-c("disease_1", "disease_2", "disease_3", "disease_4")
code <-c(124, 546, 890, 898)
risk_score <-c(10, 122, 45, 98)
df <-data.frame(dz, code, risk_score)
And the simulated data set I am interested in
id <- c(1,1,1,2,2,2,2,3,3,4,4,4,4,4,4,5,5,5)
proc <-c(244,546,234,345,890,123,434,634,233,345,124,234,634,546,789,890,567,124)
proc<-as.character(proc)
data<-data.frame(id, proc)
so what I want to achieve is something like this
id<-c(1,2,3,4,5)
code_match<-c(546,890,124,546,890)
highest_risk_score <-c(122,45,10,122,45)
output_df<-data.frame(id, code_match, highest_risk_score)
with this output
id code_match highest_risk_score
1 1 546 122
2 2 890 45
3 3 124 10
4 4 546 122
5 5 890 45
with id being the identifier, the code_match being the code with the highest risk score, and the highest_risk_score being the value of the risk score (the highest value for that id).
r
I am interested in cycling through a list of diagnosis codes and populating a new variable with a previously calculated risk score if the value matches, and if there are multiple matches populate the new variable with the highest risk score.
I am hoping to take the long form of the original data set and for each ID match the proc number with the highest risk score and store both the proc number and risk score in separate variables.
I have some experience using if loops to do similar things in wide data, but cannot figure out how to do it this way. I have no experience matching and then storing the highest value, so don't even know where to start with this.
Data to see what I am getting at:
Here is the data from for the diagnosis codes
dz <-c("disease_1", "disease_2", "disease_3", "disease_4")
code <-c(124, 546, 890, 898)
risk_score <-c(10, 122, 45, 98)
df <-data.frame(dz, code, risk_score)
And the simulated data set I am interested in
id <- c(1,1,1,2,2,2,2,3,3,4,4,4,4,4,4,5,5,5)
proc <-c(244,546,234,345,890,123,434,634,233,345,124,234,634,546,789,890,567,124)
proc<-as.character(proc)
data<-data.frame(id, proc)
so what I want to achieve is something like this
id<-c(1,2,3,4,5)
code_match<-c(546,890,124,546,890)
highest_risk_score <-c(122,45,10,122,45)
output_df<-data.frame(id, code_match, highest_risk_score)
with this output
id code_match highest_risk_score
1 1 546 122
2 2 890 45
3 3 124 10
4 4 546 122
5 5 890 45
with id being the identifier, the code_match being the code with the highest risk score, and the highest_risk_score being the value of the risk score (the highest value for that id).
r
r
edited Nov 25 '18 at 20:51
Tim Feeney
asked Nov 25 '18 at 20:32
Tim FeeneyTim Feeney
616
616
you are correct
– Tim Feeney
Nov 25 '18 at 20:51
It's true, because I am not interested in those codes. the data I am working with will have multiple codes per ID that I have no interest in.
– Tim Feeney
Nov 25 '18 at 21:00
correct, because I don't know how to do it. I thought an example of the output I am interested in would illustrate what I am hoping to achieve.
– Tim Feeney
Nov 25 '18 at 21:02
Not sure why all the-1s today but I ticked it back to 0. This had code + data and was reproducible.
– hrbrmstr
Nov 26 '18 at 0:23
add a comment |
you are correct
– Tim Feeney
Nov 25 '18 at 20:51
It's true, because I am not interested in those codes. the data I am working with will have multiple codes per ID that I have no interest in.
– Tim Feeney
Nov 25 '18 at 21:00
correct, because I don't know how to do it. I thought an example of the output I am interested in would illustrate what I am hoping to achieve.
– Tim Feeney
Nov 25 '18 at 21:02
Not sure why all the-1s today but I ticked it back to 0. This had code + data and was reproducible.
– hrbrmstr
Nov 26 '18 at 0:23
you are correct
– Tim Feeney
Nov 25 '18 at 20:51
you are correct
– Tim Feeney
Nov 25 '18 at 20:51
It's true, because I am not interested in those codes. the data I am working with will have multiple codes per ID that I have no interest in.
– Tim Feeney
Nov 25 '18 at 21:00
It's true, because I am not interested in those codes. the data I am working with will have multiple codes per ID that I have no interest in.
– Tim Feeney
Nov 25 '18 at 21:00
correct, because I don't know how to do it. I thought an example of the output I am interested in would illustrate what I am hoping to achieve.
– Tim Feeney
Nov 25 '18 at 21:02
correct, because I don't know how to do it. I thought an example of the output I am interested in would illustrate what I am hoping to achieve.
– Tim Feeney
Nov 25 '18 at 21:02
Not sure why all the
-1s today but I ticked it back to 0. This had code + data and was reproducible.– hrbrmstr
Nov 26 '18 at 0:23
Not sure why all the
-1s today but I ticked it back to 0. This had code + data and was reproducible.– hrbrmstr
Nov 26 '18 at 0:23
add a comment |
1 Answer
1
active
oldest
votes
We'll use an alternate way of creating those data frames:
data.frame(
dz = c("disease_1", "disease_2", "disease_3", "disease_4"),
code = as.character(c(124, 546, 890, 898)),
risk_score = c(10, 122, 45, 98),
stringsAsFactors = FALSE
) -> df
data.frame(
id = c(1, 1, 1, 2, 2, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5),
proc = as.character(c(244, 546, 234, 345, 890, 123, 434, 634, 233, 345, 124, 234, 634, 546, 789, 890, 567, 124)),
stringsAsFactors = FALSE
) -> data
Here's one way (in tidyverse and base R) to do this:
57 compiled 📦 dependency tidyverse solution:
library(tidyverse)
filter(data, proc %in% df$code) %>%
left_join(df, by=c("proc"="code")) %>%
group_by(id) %>%
top_n(1) %>%
slice(1) %>%
select(id, code_match = proc, highest_risk_score = risk_score)
## # A tibble: 4 x 3
## # Groups: id [4]
## id code_match highest_risk_score
## <dbl> <chr> <dbl>
## 1 1. 546 122.
## 2 2. 890 45.
## 3 4. 546 122.
## 4 5. 890 45.
0 📦 (ok, 1 — stats — which comes along for the ride with base R) Base R solution
tmp <- merge(data[with(data, proc %in% df$code),], df, by.x = "proc", by.y = "code")
do.call(
rbind.data.frame,
lapply(
split(tmp, tmp$id),
function(x) {
x[which.max(x$risk_score),]
}
)
)[,-3] -> tmp
setNames(tmp[,c(2,1,3)], c("id", "code_match", "highest_risk_score"))
## id code_match highest_risk_score
## 1 1 546 122
## 2 2 890 45
## 4 4 546 122
## 5 5 890 45
You've not mentioned how to handle not-matches so this just ignores them.
This works great and introduced me to top_n(), thanks. However, I ran into an issue where some IDs have multiple instances because the id had a the same code with risk listed more than once. How can I select out just one instance after the last line in thetidyversemethod code?
– Tim Feeney
Nov 26 '18 at 0:21
See the update. Aslice(1)should work. (and I forgot anungroup()at the end which you should def add.
– hrbrmstr
Nov 26 '18 at 0:22
worked great, thanks!
– Tim Feeney
Nov 26 '18 at 0:26
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53471650%2fcycle-through-list-to-match-value-with-multiple-matches-possible%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
We'll use an alternate way of creating those data frames:
data.frame(
dz = c("disease_1", "disease_2", "disease_3", "disease_4"),
code = as.character(c(124, 546, 890, 898)),
risk_score = c(10, 122, 45, 98),
stringsAsFactors = FALSE
) -> df
data.frame(
id = c(1, 1, 1, 2, 2, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5),
proc = as.character(c(244, 546, 234, 345, 890, 123, 434, 634, 233, 345, 124, 234, 634, 546, 789, 890, 567, 124)),
stringsAsFactors = FALSE
) -> data
Here's one way (in tidyverse and base R) to do this:
57 compiled 📦 dependency tidyverse solution:
library(tidyverse)
filter(data, proc %in% df$code) %>%
left_join(df, by=c("proc"="code")) %>%
group_by(id) %>%
top_n(1) %>%
slice(1) %>%
select(id, code_match = proc, highest_risk_score = risk_score)
## # A tibble: 4 x 3
## # Groups: id [4]
## id code_match highest_risk_score
## <dbl> <chr> <dbl>
## 1 1. 546 122.
## 2 2. 890 45.
## 3 4. 546 122.
## 4 5. 890 45.
0 📦 (ok, 1 — stats — which comes along for the ride with base R) Base R solution
tmp <- merge(data[with(data, proc %in% df$code),], df, by.x = "proc", by.y = "code")
do.call(
rbind.data.frame,
lapply(
split(tmp, tmp$id),
function(x) {
x[which.max(x$risk_score),]
}
)
)[,-3] -> tmp
setNames(tmp[,c(2,1,3)], c("id", "code_match", "highest_risk_score"))
## id code_match highest_risk_score
## 1 1 546 122
## 2 2 890 45
## 4 4 546 122
## 5 5 890 45
You've not mentioned how to handle not-matches so this just ignores them.
This works great and introduced me to top_n(), thanks. However, I ran into an issue where some IDs have multiple instances because the id had a the same code with risk listed more than once. How can I select out just one instance after the last line in thetidyversemethod code?
– Tim Feeney
Nov 26 '18 at 0:21
See the update. Aslice(1)should work. (and I forgot anungroup()at the end which you should def add.
– hrbrmstr
Nov 26 '18 at 0:22
worked great, thanks!
– Tim Feeney
Nov 26 '18 at 0:26
add a comment |
We'll use an alternate way of creating those data frames:
data.frame(
dz = c("disease_1", "disease_2", "disease_3", "disease_4"),
code = as.character(c(124, 546, 890, 898)),
risk_score = c(10, 122, 45, 98),
stringsAsFactors = FALSE
) -> df
data.frame(
id = c(1, 1, 1, 2, 2, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5),
proc = as.character(c(244, 546, 234, 345, 890, 123, 434, 634, 233, 345, 124, 234, 634, 546, 789, 890, 567, 124)),
stringsAsFactors = FALSE
) -> data
Here's one way (in tidyverse and base R) to do this:
57 compiled 📦 dependency tidyverse solution:
library(tidyverse)
filter(data, proc %in% df$code) %>%
left_join(df, by=c("proc"="code")) %>%
group_by(id) %>%
top_n(1) %>%
slice(1) %>%
select(id, code_match = proc, highest_risk_score = risk_score)
## # A tibble: 4 x 3
## # Groups: id [4]
## id code_match highest_risk_score
## <dbl> <chr> <dbl>
## 1 1. 546 122.
## 2 2. 890 45.
## 3 4. 546 122.
## 4 5. 890 45.
0 📦 (ok, 1 — stats — which comes along for the ride with base R) Base R solution
tmp <- merge(data[with(data, proc %in% df$code),], df, by.x = "proc", by.y = "code")
do.call(
rbind.data.frame,
lapply(
split(tmp, tmp$id),
function(x) {
x[which.max(x$risk_score),]
}
)
)[,-3] -> tmp
setNames(tmp[,c(2,1,3)], c("id", "code_match", "highest_risk_score"))
## id code_match highest_risk_score
## 1 1 546 122
## 2 2 890 45
## 4 4 546 122
## 5 5 890 45
You've not mentioned how to handle not-matches so this just ignores them.
This works great and introduced me to top_n(), thanks. However, I ran into an issue where some IDs have multiple instances because the id had a the same code with risk listed more than once. How can I select out just one instance after the last line in thetidyversemethod code?
– Tim Feeney
Nov 26 '18 at 0:21
See the update. Aslice(1)should work. (and I forgot anungroup()at the end which you should def add.
– hrbrmstr
Nov 26 '18 at 0:22
worked great, thanks!
– Tim Feeney
Nov 26 '18 at 0:26
add a comment |
We'll use an alternate way of creating those data frames:
data.frame(
dz = c("disease_1", "disease_2", "disease_3", "disease_4"),
code = as.character(c(124, 546, 890, 898)),
risk_score = c(10, 122, 45, 98),
stringsAsFactors = FALSE
) -> df
data.frame(
id = c(1, 1, 1, 2, 2, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5),
proc = as.character(c(244, 546, 234, 345, 890, 123, 434, 634, 233, 345, 124, 234, 634, 546, 789, 890, 567, 124)),
stringsAsFactors = FALSE
) -> data
Here's one way (in tidyverse and base R) to do this:
57 compiled 📦 dependency tidyverse solution:
library(tidyverse)
filter(data, proc %in% df$code) %>%
left_join(df, by=c("proc"="code")) %>%
group_by(id) %>%
top_n(1) %>%
slice(1) %>%
select(id, code_match = proc, highest_risk_score = risk_score)
## # A tibble: 4 x 3
## # Groups: id [4]
## id code_match highest_risk_score
## <dbl> <chr> <dbl>
## 1 1. 546 122.
## 2 2. 890 45.
## 3 4. 546 122.
## 4 5. 890 45.
0 📦 (ok, 1 — stats — which comes along for the ride with base R) Base R solution
tmp <- merge(data[with(data, proc %in% df$code),], df, by.x = "proc", by.y = "code")
do.call(
rbind.data.frame,
lapply(
split(tmp, tmp$id),
function(x) {
x[which.max(x$risk_score),]
}
)
)[,-3] -> tmp
setNames(tmp[,c(2,1,3)], c("id", "code_match", "highest_risk_score"))
## id code_match highest_risk_score
## 1 1 546 122
## 2 2 890 45
## 4 4 546 122
## 5 5 890 45
You've not mentioned how to handle not-matches so this just ignores them.
We'll use an alternate way of creating those data frames:
data.frame(
dz = c("disease_1", "disease_2", "disease_3", "disease_4"),
code = as.character(c(124, 546, 890, 898)),
risk_score = c(10, 122, 45, 98),
stringsAsFactors = FALSE
) -> df
data.frame(
id = c(1, 1, 1, 2, 2, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5),
proc = as.character(c(244, 546, 234, 345, 890, 123, 434, 634, 233, 345, 124, 234, 634, 546, 789, 890, 567, 124)),
stringsAsFactors = FALSE
) -> data
Here's one way (in tidyverse and base R) to do this:
57 compiled 📦 dependency tidyverse solution:
library(tidyverse)
filter(data, proc %in% df$code) %>%
left_join(df, by=c("proc"="code")) %>%
group_by(id) %>%
top_n(1) %>%
slice(1) %>%
select(id, code_match = proc, highest_risk_score = risk_score)
## # A tibble: 4 x 3
## # Groups: id [4]
## id code_match highest_risk_score
## <dbl> <chr> <dbl>
## 1 1. 546 122.
## 2 2. 890 45.
## 3 4. 546 122.
## 4 5. 890 45.
0 📦 (ok, 1 — stats — which comes along for the ride with base R) Base R solution
tmp <- merge(data[with(data, proc %in% df$code),], df, by.x = "proc", by.y = "code")
do.call(
rbind.data.frame,
lapply(
split(tmp, tmp$id),
function(x) {
x[which.max(x$risk_score),]
}
)
)[,-3] -> tmp
setNames(tmp[,c(2,1,3)], c("id", "code_match", "highest_risk_score"))
## id code_match highest_risk_score
## 1 1 546 122
## 2 2 890 45
## 4 4 546 122
## 5 5 890 45
You've not mentioned how to handle not-matches so this just ignores them.
edited Nov 26 '18 at 0:22
answered Nov 25 '18 at 21:04
hrbrmstrhrbrmstr
61.6k693153
61.6k693153
This works great and introduced me to top_n(), thanks. However, I ran into an issue where some IDs have multiple instances because the id had a the same code with risk listed more than once. How can I select out just one instance after the last line in thetidyversemethod code?
– Tim Feeney
Nov 26 '18 at 0:21
See the update. Aslice(1)should work. (and I forgot anungroup()at the end which you should def add.
– hrbrmstr
Nov 26 '18 at 0:22
worked great, thanks!
– Tim Feeney
Nov 26 '18 at 0:26
add a comment |
This works great and introduced me to top_n(), thanks. However, I ran into an issue where some IDs have multiple instances because the id had a the same code with risk listed more than once. How can I select out just one instance after the last line in thetidyversemethod code?
– Tim Feeney
Nov 26 '18 at 0:21
See the update. Aslice(1)should work. (and I forgot anungroup()at the end which you should def add.
– hrbrmstr
Nov 26 '18 at 0:22
worked great, thanks!
– Tim Feeney
Nov 26 '18 at 0:26
This works great and introduced me to top_n(), thanks. However, I ran into an issue where some IDs have multiple instances because the id had a the same code with risk listed more than once. How can I select out just one instance after the last line in the
tidyverse method code?– Tim Feeney
Nov 26 '18 at 0:21
This works great and introduced me to top_n(), thanks. However, I ran into an issue where some IDs have multiple instances because the id had a the same code with risk listed more than once. How can I select out just one instance after the last line in the
tidyverse method code?– Tim Feeney
Nov 26 '18 at 0:21
See the update. A
slice(1) should work. (and I forgot an ungroup() at the end which you should def add.– hrbrmstr
Nov 26 '18 at 0:22
See the update. A
slice(1) should work. (and I forgot an ungroup() at the end which you should def add.– hrbrmstr
Nov 26 '18 at 0:22
worked great, thanks!
– Tim Feeney
Nov 26 '18 at 0:26
worked great, thanks!
– Tim Feeney
Nov 26 '18 at 0:26
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53471650%2fcycle-through-list-to-match-value-with-multiple-matches-possible%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
you are correct
– Tim Feeney
Nov 25 '18 at 20:51
It's true, because I am not interested in those codes. the data I am working with will have multiple codes per ID that I have no interest in.
– Tim Feeney
Nov 25 '18 at 21:00
correct, because I don't know how to do it. I thought an example of the output I am interested in would illustrate what I am hoping to achieve.
– Tim Feeney
Nov 25 '18 at 21:02
Not sure why all the
-1s today but I ticked it back to 0. This had code + data and was reproducible.– hrbrmstr
Nov 26 '18 at 0:23