search for: usa1540165

Displaying 4 results from an estimated 4 matches for "usa1540165".

2018 Feb 05
0
find unique and summerize
...; newID <- paste0(a, b, c2) > > > Hope this helps, > > Rui Barradas > > On 2/4/2018 2:01 AM, Val wrote: > >> Thank you so much again for your help! >> >> I have one more question related to this. >> >> 1. How do I further split this "358USA1540165 " into three parts. >> a) 358 >> b) USA >> c) 1540165 >> >> I want to add leading zeros to the third part like "0001540165" >> and then combine b and c to get this USA1540165 >> so USA1540165 changed to USA1540165 >> >> The o...
2018 Feb 03
2
find unique and summerize
...40164 1 15 A 44CAN1540164 1 30 A 44CAN1540164 1 24 A 44CAN1540164 1 25 A 44CAN1540164 1 11 A 33CAN1540164 1 12 A 33CAN1540164 1 23 A 33CAN1540164 1 65 A 33CAN1540164 1 41 A 358CAN1540164 1 28 A 358CAN1540164 1 32 A 358CAN1540164 1 41 A 358CAN1540164 1 54 A 358CAN1540164 1 29 A 358CAN1540164 1 64 B 1USA1540165 1 125 B 1USA1540165 1 165 B 44USA1540165 1 171 B 33USA1540165 1 254 B 33USA1540165 1 241 B 33USA1540165 1 262 B 358USA1540165 1 321 C 358FIN1540166 1 225 "),header = TRUE ,stringsAsFactors = FALSE) >From the above data there are three unique IDs and four country codes (1, 44, 33 and 358)...
2018 Feb 03
2
find unique and summerize
...select those unique Ids that do have records in all countries. From the above data set, this ID "FIN1540166" should be excluded from the summary table and the table looks like as follow IDNum Country 1 33 358 44 Sum CAN1540164 47 141 248 90 526 USA1540165 290 757 321 171 1539 Sum 337 898 569 261 2065 Thank you again On Fri, Feb 2, 2018 at 11:26 PM, Rui Barradas <ruipbarradas at sapo.pt> wrote: > Hello, > > Thanks for the reproducible example. > See if the following does what you want. > > IDNum <- sub(...
2018 Feb 03
0
find unique and summerize
...40164 1 25 > A 44CAN1540164 1 11 > A 33CAN1540164 1 12 > A 33CAN1540164 1 23 > A 33CAN1540164 1 65 > A 33CAN1540164 1 41 > A 358CAN1540164 1 28 > A 358CAN1540164 1 32 > A 358CAN1540164 1 41 > A 358CAN1540164 1 54 > A 358CAN1540164 1 29 > A 358CAN1540164 1 64 > B 1USA1540165 1 125 > B 1USA1540165 1 165 > B 44USA1540165 1 171 > B 33USA1540165 1 254 > B 33USA1540165 1 241 > B 33USA1540165 1 262 > B 358USA1540165 1 321 > C 358FIN1540166 1 225 "),header = TRUE ,stringsAsFactors = FALSE) > > From the above data there are three unique IDs an...